summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-shells/zsh/files/prompt_gentoo_setup')
-rw-r--r--app-shells/zsh/files/prompt_gentoo_setup45
1 files changed, 0 insertions, 45 deletions
diff --git a/app-shells/zsh/files/prompt_gentoo_setup b/app-shells/zsh/files/prompt_gentoo_setup
deleted file mode 100644
index abc3ceb154c5..000000000000
--- a/app-shells/zsh/files/prompt_gentoo_setup
+++ /dev/null
@@ -1,45 +0,0 @@
-# gentoo prompt theme
-
-prompt_gentoo_help () {
- cat <<'EOF'
-This prompt is color-scheme-able. You can invoke it thus:
-
- prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]]
-
-EOF
-}
-
-prompt_gentoo_setup () {
- prompt_gentoo_prompt=${1:-'blue'}
- prompt_gentoo_user=${2:-'green'}
- prompt_gentoo_root=${3:-'red'}
-
- if [ "$USER" = 'root' ]
- then
- base_prompt="%{$fg_bold[$prompt_gentoo_root]%}%m%{$reset_color%} "
- else
- base_prompt="%{$fg_bold[$prompt_gentoo_user]%}%n@%m%{$reset_color%} "
- fi
- post_prompt="%{$reset_color%}"
-
- local color="%{*}"
- base_prompt_no_color="${(S)base_prompt//${~color}/}"
- post_prompt_no_color="${(S)post_prompt//${~color}/}"
-
- setopt noxtrace localoptions
- local base_prompt_expanded_no_color base_prompt_etc
- local prompt_length space_left
-
- base_prompt_expanded_no_color=$(print -P "$base_prompt_no_color")
- base_prompt_etc=$(print -P "$base_prompt%(4~|...|)%3~")
- prompt_length=${#base_prompt_etc}
- path_prompt="%{$fg_bold[$prompt_gentoo_prompt]%}%1~"
- PS1="$base_prompt$path_prompt %# $post_prompt"
- PS2="$base_prompt$path_prompt %_> $post_prompt"
- PS3="$base_prompt$path_prompt ?# $post_prompt"
-
- precmd () { }
- preexec () { }
-}
-
-prompt_gentoo_setup "$@"