mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-04 15:07:23 +01:00
start out with thoughtbots version
This commit is contained in:
committed by
Thomas Ruoff
parent
891caebf74
commit
bc1bd4f5e6
9
zsh/configs/prompt.zsh
Normal file
9
zsh/configs/prompt.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
# modify the prompt to contain git branch name if applicable
|
||||
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
|
||||
PS1='${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%c%{$reset_color%}$(git_prompt_info) %# '
|
||||
Reference in New Issue
Block a user