summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
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 () {