Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abtris/vcprompt
Bash prompt for hightlight VCS support SVN, GIT (git-svn), Mercurial
https://github.com/abtris/vcprompt
Last synced: about 1 month ago
JSON representation
Bash prompt for hightlight VCS support SVN, GIT (git-svn), Mercurial
- Host: GitHub
- URL: https://github.com/abtris/vcprompt
- Owner: abtris
- Created: 2010-03-25T13:59:13.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-03-25T13:59:31.000Z (over 14 years ago)
- Last Synced: 2024-04-15T03:04:08.581Z (7 months ago)
- Language: C
- Homepage:
- Size: 132 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
vcprompt
========vcprompt is a little C program that prints a short string, designed to
be included in your prompt, with barebones information about the current
working directory for various version control systems. It is designed
to be small and lightweight rather than comprehensive.Currently, it knows how to get (and print) the current branch for CVS,
Git, and Mercurial working copies. Eventually, I plan to add support
for Subversion and Bazaar, and give it the (optional) ability to also
indicate how dirty the working copy is, i.e. whether there are unknown
files and whether there are local changes (modified/removed/added
files).vcprompt currently has no external dependencies: it does everything with
the standard C library. I suspect this will not last long: e.g. to
determine anything about a Subversion working copy will probably require
using the Subversion C API.To compile vcprompt:
make
To install it:
cp -p vcprompt ~/bin
To use it with bash, just call it in PS1:
PS1='\u@\h:\w $(vcprompt)\$'
To use it with zsh, you need to enable shell option PROMPT_SUBST, and
then do similarly to bash:setopt prompt_subst
PROMPT='[%n@%m] [%~] $(vcprompt)'