about summary refs log tree commit diff
path: root/Functions/Prompts/prompt_walters_setup
blob: a0777f1bb81c7317e3603177db5a019bab352a21 (plain) (blame)
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
prompt_walters_help () {
  cat <<'EOF'
This prompt is color-scheme-able.  You can invoke it thus:

  prompt walters [<color1>]

where the color is for the right-hand prompt.

This prompt was stolen from Colin Walters <walters@debian.org>,
who gives credit to Michel Daenzer <daenzer@debian.org>.
EOF
}

prompt_walters_setup () {

if [[ "$TERM" != "dumb" ]]; then
    export PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
    export RPROMPT="%{$fg_no_bold[${1:-green}]%}%~%{$reset_color%}"
else
    export PROMPT="%(?..[%?] )%n@%m:%~> "
fi

}

prompt_walters_setup "$@"