diff options
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -99,15 +99,14 @@ prompt_eof_setup() { } prompt_eof_setup "$@" - +# }}} +# Prompt {{{ EXITCODE="%(?..(%?%1) )" # function to show the current git branch in prompt parse_git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' + git branch 2> /dev/null | sed -n 's/\* \(.*\)/\(\1\)/p' } -# }}} -# Prompt {{{ # necessary if you want to use functions in the prompt # without this they wouldn't be run again precmd () { |