Next: , Previous: , Up: User Contributions   [Contents][Index]


26.5 Gathering information from version control systems

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:

Bazaar (bzr)

http://bazaar.canonical.com/

Codeville (cdv)

http://freecode.com/projects/codeville/

Concurrent Versioning System (cvs)

http://www.nongnu.org/cvs/

Darcs (darcs)

http://darcs.net/

Fossil (fossil)

http://fossil-scm.org/

Git (git)

http://git-scm.com/

GNU arch (tla)

http://www.gnu.org/software/gnu-arch/

Mercurial (hg)

http://mercurial.selenic.com/

Monotone (mtn)

http://monotone.ca/

Perforce (p4)

http://www.perforce.com/

Subversion (svn)

http://subversion.apache.org/

SVK (svk)

http://svk.bestpractical.com/

There is also support for the patch management system quilt (http://savannah.nongnu.org/projects/quilt). See vcs_info 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.


Next: , Previous: , Up: User Contributions   [Contents][Index]