diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-05 21:42:36 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-05 21:42:36 +0800 |
commit | 0927cea6ab1742be4fc2a448d9d4c5e82cb441c6 (patch) | |
tree | 1d2176e4c0e4afe983fcccdaee608fa62fa5f05e /zsh | |
parent | 4234b1034630f0c8714ac7201b98bf70cdd5f625 (diff) |
Update
Diffstat (limited to 'zsh')
-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" |