summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-07-15 13:47:01 +0200
committerFlorian Pritz <f-p@gmx.at>2009-07-15 13:56:31 +0200
commit847ced3b02ac6940269312a9872fba3053516177 (patch)
treeac2b498937a633f023a6dbdc0f7677c16553ab76 /.zshrc
parent97d599e935ad56d81459b843c69faef9ee25491a (diff)
downloaddotfiles-847ced3b02ac6940269312a9872fba3053516177.tar.gz
dotfiles-847ced3b02ac6940269312a9872fba3053516177.tar.xz
new parse_git_branch
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc7
1 files changed, 3 insertions, 4 deletions
diff --git a/.zshrc b/.zshrc
index bec0aec..ad33498 100644
--- a/.zshrc
+++ b/.zshrc
@@ -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 () {