File: prompt_pws_setup

package info (click to toggle)
zsh-beta 4.3.17-dev-0%2B20120621-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 19,804 kB
  • sloc: ansic: 95,966; sh: 5,899; makefile: 845; perl: 745; awk: 383; sed: 16
file content (22 lines) | stat: -rw-r--r-- 663 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# pws prompt theme

prompt_pws_help() {
    cat <<'EOF'
Simple prompt which tries to display only the information you need.
- highlighted parenthesised status if last command had non-zero status
- bold + if shell is not at top level (may need tweaking if there
  is another shell in the process history of your terminal)
- number of background jobs in square brackets if non-zero
- time in yellow on black, with Ding! on the hour.
I usually use this in a white on black terminal.
EOF
}

prompt_pws_setup() {
      PS1='%K{white}%F{red}%(?..(%?%))'\
'%K{black}%F{white}%B%(2L.+.)%(1j.[%j].)'\
'%F{yellow}%(t.Ding!.%D{%L:%M})'\
'%f%k%b%# '
}

prompt_pws_setup "$@"