summaryrefslogtreecommitdiff
path: root/etc/prompt
blob: c16dbaf4fbecbef5862f4b889ab7ec9e5382d66a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Prompt
## vim:ft=zsh
# RPS1 is on the right side of the terminal
# The \ek\e\\ is for screen's 'shelltitle'

# psvar[1] = directory info
# psvar[2] = rtab (current directory)

host="${ps_yellow}%m"
dir="${ps_reset}%30<…<%2v%>>"
(( EUID )) && ps_sign=$ps_green || ps_sign=$ps_red
sign="%(!.#.>)"
sign="${ps_sign}%(?.${sign}.%?)${ps_reset}"
screen=$'%{\ek\e\\%}'

PS1="${host} ${dir} ${sign} ${screen}"
RPS1="${ps_yellow}[${ps_info}%1v${ps_yellow}%T]${ps_reset}"

unset user at host
unset dir ps_sign sign screen

zstyle ':prompt:rtab' fish yes
zstyle ':prompt:rtab' nameddirs yes