diff options
Diffstat (limited to 'zsh/zshrc')
| -rw-r--r-- | zsh/zshrc | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -37,7 +37,6 @@ zstyle ':completion:*' menu select | |||
| 37 | zstyle ':completion::complete:*' gain-privileges 1 | 37 | zstyle ':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 | |||
| 51 | add-zsh-hook precmd precmd | 50 | add-zsh-hook precmd precmd |
| 52 | function precmd() { | 51 | function 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" |