Last active
June 15, 2017 20:32
-
-
Save meoso/1ece25701c4860749378c6ecc1934d4a to your computer and use it in GitHub Desktop.
ghetto bash-prompt git-status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# append your ~/.bashrc to include | |
# PROMPT_COMMAND=~/path/to/gitstatus.sh | |
# skip a line irregardless | |
echo | |
echo $'\e[7m' $(date +"%b %d; %H:%M:%S")' '$'\e[m' #date in reverse color | |
# only run if in a git repo root | |
if [[ -e .git ]] ; then | |
#if you dont want to see modified files, uncomment pipe to head | |
git status -uno -sb #| head -n1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment