-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.zsh
32 lines (27 loc) · 927 Bytes
/
interface.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:*' formats ' %F{magenta}[%f%b%F{magenta}]%c%u%f'
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr ' %F{blue}⚡%f'
zstyle ':vcs_info:git:*' unstagedstr ' %F{blue}⚡%f'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
PS1='%F{red}%m%f %F{magenta}%3~%f${vcs_info_msg_0_}%f '
function title {
local value="${${${(V)1//\%/\%\%}//'\n'/; }//'\t'/ }"
value="%70>...>$value%<<"
case $TERM in
screen)
print -Pn "\ek${value}\e\\"
print -Pn "\e_${location}\e\\"
;;
xterm*)
if [[ -z $SSH_TTY ]]; then
print -Pn "\e]0;$value $2\a"
else
print -Pn "\e]0;$value@$HOST $2\a"
fi
;;
esac
}
function chpwd { ls }
function precmd { vcs_info; title "zsh" "%~" }
function preexec { title "$1" }