aboutsummaryrefslogtreecommitdiffhomepage
path: root/zsh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-04-05 21:42:36 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-04-05 21:42:36 +0800
commit0927cea6ab1742be4fc2a448d9d4c5e82cb441c6 (patch)
tree1d2176e4c0e4afe983fcccdaee608fa62fa5f05e /zsh
parent4234b1034630f0c8714ac7201b98bf70cdd5f625 (diff)
Update
Diffstat (limited to 'zsh')
-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"