Skip to content

Instantly share code, notes, and snippets.

@Dimanaux
Created May 9, 2020 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dimanaux/ccd677bfa53caa6af791faae735eeb8d to your computer and use it in GitHub Desktop.
Save Dimanaux/ccd677bfa53caa6af791faae735eeb8d to your computer and use it in GitHub Desktop.
function git_branch() {
branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}')
if [[ $branch == "" ]]; then
:
else
echo "$branch "
fi
}
setopt prompt_subst
PROMPT='%B%F{240}%2~%f%b %F{red}$(git_branch)%f%(?.%#.%F{red}%#)%f '
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias code='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code'
alias untar='tar -zxvf'
alias wget='wget -c'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment