Skip to content

Instantly share code, notes, and snippets.

@meoso
Last active June 15, 2017 20:32
Show Gist options
  • Save meoso/1ece25701c4860749378c6ecc1934d4a to your computer and use it in GitHub Desktop.
Save meoso/1ece25701c4860749378c6ecc1934d4a to your computer and use it in GitHub Desktop.
ghetto bash-prompt git-status
# 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