mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 00:47:30 +00:00
7b9119cc9a
fish_git_prompt encloses its output in brackets, however this can be changed by supplying a format string to it, i.e. `fish_git_prompt %s`. However when using `fish_vcs_prompt` there's no way to pass on the arg to fish_git_prompt, so you need to manually remove it. fish_hg_prompt doesn't have the same format string support as fish_git_prompt, but I suppose it could be added later if needed.
10 lines
500 B
Fish
10 lines
500 B
Fish
function fish_vcs_prompt --description "Print the prompts for all available vcsen"
|
|
# If a prompt succeeded, we assume that it's printed the correct info.
|
|
# This is so we don't try svn if git already worked.
|
|
fish_git_prompt $argv
|
|
or fish_hg_prompt $argv
|
|
# The svn prompt is disabled by default because it's quite slow on common svn repositories.
|
|
# To enable it uncomment it.
|
|
# You can also only use it in specific directories by checking $PWD.
|
|
# or fish_svn_prompt
|
|
end
|