In a lot of cases, it is nice to automatically retrieve information from version control systems (VCSs), such as subversion, CVS or git, to be able to provide it to the user; possibly in the user’s prompt. So that you can instantly tell which branch you are currently on, for example.
In order to do that, you may use the vcs_info
function.
The following VCSs are supported, showing the abbreviated name by which they are referred to within the system:
bzr
)cdv
)cvs
)darcs
)fossil
)git
)tla
)hg
)mtn
)p4
)svn
)svk
)There is also support for the patch management system quilt
(https://savannah.nongnu.org/projects/quilt
). See
Quilt Support
below for details.
To load vcs_info
:
autoload -Uz vcs_info
It can be used in any existing prompt, because it does not require any
specific $psvar
entries to be available.