-
Couldn't load subscription status.
- Fork 0
thomasvs/bash-prompt-git
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SAMPLE OUTPUT
-------------
(b:release-0.2.x d:deploy-pro-2012-03-29) [thomas@otto platform]$ ls
Makefile platform puppet RELEASE-0.2.1
(b:release-0.2.x d:deploy-pro-2012-03-29) [thomas@otto platform]$ cd puppet/pro/
(s:puppet/pro b:release-0.2.x d:v0.2.1) [thomas@otto pro]$
In the first prompt, I'm in the root module, on the release-0.2.x branch,
at a commit described by tag deploy-pro-2012-03-29.
In the last prompt, I went into a submodule, so I'm now in
submodule puppet/pro, on branch release-0.2.x, described by tag v0.2.1
INSTALL
-------
- run 'make install' as a user to put bash scripts in place
- make sure you source the script in your .bashrc or .bash_profile
source $HOME/.bashrc.d/git
(I have these lines in .bashrc to do so:
if test -e ~/.bashrc.d
then
for f in ~/.bashrc.d/*
do
source $f
done
fi
- set the prompt in your .bashrc or .bash_profile with
PS1="\$(parse_git_branch)$PS1"
About
show submodule/branch/describe info in bash prompt
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published