Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
bash prompt
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 >

This comment has been minimized.

Copy link
Owner Author

@ranjitiyer ranjitiyer commented May 23, 2018

export PS1="@ \w[\033[33m]$(parse_git_branch)[\033[00m] $"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment