From f7c981af6337d8d8ad44874809b016fab4cccbca Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 9 Feb 2019 15:48:34 +0100 Subject: [PATCH] Document vcs prompt --- doc_src/fish_vcs_prompt.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc_src/fish_vcs_prompt.txt diff --git a/doc_src/fish_vcs_prompt.txt b/doc_src/fish_vcs_prompt.txt new file mode 100644 index 000000000..fd743473e --- /dev/null +++ b/doc_src/fish_vcs_prompt.txt @@ -0,0 +1,28 @@ +\section fish_vcs_prompt fish_vcs_prompt - output vcs information for use in a prompt + +\subsection fish_vcs_prompt-description Description + +The fish_vcs_prompt function can be used to display information about the current vcs repository, if any. + +It calls out to vcs-specific functions. The currently supported ones are: + +- fish_git_prompt +- fish_hg_prompt +- fish_svn_prompt + +If a vcs isn't installed, the respective function does nothing. + +For more information, see their documentation. + +\subsection fish_vcs_prompt-example Example + +A simple prompt that displays vcs info: + +\fish +function fish_prompt + ... + set -g __fish_git_prompt_showupstream auto + printf '%s %s$' $PWD (fish_vcs_prompt) +end +\endfish +