diff options
author | Florian Pritz <f-p@gmx.at> | 2009-07-15 13:47:01 +0200 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2009-07-15 13:56:31 +0200 |
commit | 847ced3b02ac6940269312a9872fba3053516177 (patch) | |
tree | ac2b498937a633f023a6dbdc0f7677c16553ab76 | |
parent | 97d599e935ad56d81459b843c69faef9ee25491a (diff) | |
download | dotfiles-847ced3b02ac6940269312a9872fba3053516177.tar.gz dotfiles-847ced3b02ac6940269312a9872fba3053516177.tar.xz |
new parse_git_branch
-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 () { |