Move __fish_git_prompt -> fish_git_prompt

This exposes it more, since it's quite an important function.

We should do the same with the other vcs functions.

We leave a compatibility shim in place for now.
This commit is contained in:
Fabian Homborg
2019-01-26 13:36:54 +01:00
parent 34fa8ef2d2
commit cb7762b7c0
4 changed files with 828 additions and 824 deletions

View File

@@ -10,7 +10,7 @@ function fish_prompt
# - the current path (with prompt_pwd)
# - date +%X
# - the current virtual environment, if any
# - the current git status, if any, with __fish_git_prompt
# - the current git status, if any, with fish_git_prompt
# - the current battery state, if any, and if your power cable is unplugged, and if you have "acpi"
# - current background jobs, if any
@@ -79,7 +79,7 @@ function fish_prompt
and _nim_prompt_wrapper $retc V (basename "$VIRTUAL_ENV")
# git
set prompt_git (__fish_git_prompt | string trim -c ' ()')
set prompt_git (fish_git_prompt | string trim -c ' ()')
test -n "$prompt_git"
and _nim_prompt_wrapper $retc G $prompt_git