diff --git a/tag-zsh/zsh/configs/prompt.zsh b/tag-zsh/zsh/configs/prompt.zsh new file mode 100644 index 0000000..7c76bad --- /dev/null +++ b/tag-zsh/zsh/configs/prompt.zsh @@ -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) \$ '