Start customising prompt

This commit is contained in:
Oliver Davies 2020-01-21 12:17:23 +00:00
parent 9adb9cfb90
commit f1c0baf0f7

View file

@ -0,0 +1,10 @@
git_prompt_info() {
current_branch=$(git current-branch 2> /dev/null)
if [[ -n $current_branch ]]; then
echo " %{$fg_bold[green]%}$current_branch%{$reset_color%}"
fi
}
setopt promptsubst
export PS1='${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) \$ '