Lines 4-10
prompt_gentoo_help () {
Link Here
|
4 |
cat <<'EOF' |
4 |
cat <<'EOF' |
5 |
This prompt is color-scheme-able. You can invoke it thus: |
5 |
This prompt is color-scheme-able. You can invoke it thus: |
6 |
|
6 |
|
7 |
prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]] |
7 |
prompt gentoo [<promptcolor> [<usercolor> [<rootcolor> [<dircomps>>]]]] |
8 |
|
8 |
|
9 |
EOF |
9 |
EOF |
10 |
} |
10 |
} |
Lines 13-18
prompt_gentoo_setup () {
Link Here
|
13 |
local prompt_gentoo_prompt=${1:-'blue'} |
13 |
local prompt_gentoo_prompt=${1:-'blue'} |
14 |
local prompt_gentoo_user=${2:-'green'} |
14 |
local prompt_gentoo_user=${2:-'green'} |
15 |
local prompt_gentoo_root=${3:-'red'} |
15 |
local prompt_gentoo_root=${3:-'red'} |
|
|
16 |
local prompt_gentoo_dircomps=${4:-1} |
16 |
|
17 |
|
17 |
if [ "$USER" = 'root' ] |
18 |
if [ "$USER" = 'root' ] |
18 |
then |
19 |
then |
Lines 24-30
prompt_gentoo_setup () {
Link Here
|
24 |
|
25 |
|
25 |
#setopt noxtrace localoptions |
26 |
#setopt noxtrace localoptions |
26 |
|
27 |
|
27 |
local path_prompt="%B%F{$prompt_gentoo_prompt}%1~" |
28 |
local path_prompt="%B%F{$prompt_gentoo_prompt}%$prompt_gentoo_dircomps~" |
28 |
typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" |
29 |
typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" |
29 |
typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" |
30 |
typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" |
30 |
typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" |
31 |
typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" |