Start customising prompt
This commit is contained in:
parent
9adb9cfb90
commit
f1c0baf0f7
10
tag-zsh/zsh/configs/prompt.zsh
Normal file
10
tag-zsh/zsh/configs/prompt.zsh
Normal 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) \$ '
|
Loading…
Reference in a new issue