aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--zsh/zshrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 5f8b29f..92ed7bb 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -37,7 +37,6 @@ zstyle ':completion:*' menu select
37zstyle ':completion::complete:*' gain-privileges 1 37zstyle ':completion::complete:*' gain-privileges 1
38 38
39 39
40# PS1 with git status at right
41_get_context() { 40_get_context() {
42 CONTEXT_FILE=${CONTEXT_FILE:-~/.task/context} 41 CONTEXT_FILE=${CONTEXT_FILE:-~/.task/context}
43 42
@@ -51,6 +50,7 @@ autoload -Uz add-zsh-hook
51add-zsh-hook precmd precmd 50add-zsh-hook precmd precmd
52function precmd() { 51function precmd() {
53 PROMPT='%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b ' 52 PROMPT='%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b '
53 # Show context and git status of tracking repos at right
54 RIGHT=$(NUM=$($SETTING_DIR/bin/git/check-repos.sh -n); (( $NUM != 0 )) && echo $NUM) 54 RIGHT=$(NUM=$($SETTING_DIR/bin/git/check-repos.sh -n); (( $NUM != 0 )) && echo $NUM)
55 _get_context 55 _get_context
56 RPROMPT="%B%K{blue}%F{yellow}${CONTEXT:+ $CONTEXT }%f%k%K{red}%F{black}${RIGHT}%f%k%b" 56 RPROMPT="%B%K{blue}%F{yellow}${CONTEXT:+ $CONTEXT }%f%k%K{red}%F{black}${RIGHT}%f%k%b"