mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-02 19:21:15 -03:00
Add the vcs prompts to sphinx docs
This commit is contained in:
27
sphinx_doc_src/cmds/fish_vcs_prompt.rst
Normal file
27
sphinx_doc_src/cmds/fish_vcs_prompt.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
fish_vcs_prompt - output vcs information for use in a prompt
|
||||
============================================================
|
||||
|
||||
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::
|
||||
|
||||
function fish_prompt
|
||||
...
|
||||
set -g __fish_git_prompt_showupstream auto
|
||||
printf '%s %s$' $PWD (fish_vcs_prompt)
|
||||
end
|
||||
Reference in New Issue
Block a user