Created
May 23, 2018 20:40
-
-
Save ranjitiyer/4fdfaa1ec3a6a4c6cc969218be902da9 to your computer and use it in GitHub Desktop.
bash prompt
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
export PS1="\@ \w $(if [[ -e .gitignore ]]; then git branch | head -n 1 | awk '{print $2}'; fi) > " | |
Prints time in am/pm, the current working directory and the checked out gitbranch if pwd is a git repo | |
01:39 PM ~/work/emr/sparkmagic jupyter > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
export PS1="@ \w[\033[33m]$(parse_git_branch)[\033[00m] $"