summaryrefslogtreecommitdiff
path: root/.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/functions/prompt_gentoo_setup33
1 files changed, 33 insertions, 0 deletions
diff --git a/.zsh/functions/prompt_gentoo_setup b/.zsh/functions/prompt_gentoo_setup
new file mode 100644
index 0000000..0d071e9
--- /dev/null
+++ b/.zsh/functions/prompt_gentoo_setup
@@ -0,0 +1,33 @@
+# 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="%B%F{$prompt_gentoo_root}%m%k "
+ else
+ base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k "
+ fi
+ post_prompt="%b%f%k"
+
+ #setopt noxtrace localoptions
+
+ path_prompt="%B%F{$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"
+}
+
+prompt_gentoo_setup "$@"
class='insertions'>+8 2010-05-22Fix the link buttonsRené 'Necoro' Neumann1-1/+1 2010-05-20Handle missing eix-cache file more gracefullyRené 'Necoro' Neumann1-0/+7 2010-05-20More declarative handling of the database typesRené 'Necoro' Neumann3-46/+59 2010-05-12Updated French translation to current code statusClement Bourgeois1-52/+56 2010-05-12Unused French translations purgedClement Bourgeois1-18/+0 2010-05-11Fix release script pathesv0.14René 'Necoro' Neumann1-1/+2 2010-05-11Add '--plugin-dir' optionRené 'Necoro' Neumann1-1/+9 2010-05-11Add a README message to the releaseRené 'Necoro' Neumann1-1/+14