summaryrefslogtreecommitdiffstats
path: root/.zsh/rc/15prompt
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-02-15 21:22:32 +0100
committerFlorian Pritz <f-p@gmx.at>2009-02-15 21:22:32 +0100
commit0f0b43b67c0405c8f254f52627b7da950a6e5136 (patch)
tree3cec7e237d9c8d04710d9c39b080672be1d578c2 /.zsh/rc/15prompt
parent589750e3fafc296e641b1f080becb10d48810484 (diff)
downloaddotfiles-0f0b43b67c0405c8f254f52627b7da950a6e5136.tar.gz
dotfiles-0f0b43b67c0405c8f254f52627b7da950a6e5136.tar.xz
added
Diffstat (limited to '.zsh/rc/15prompt')
-rw-r--r--.zsh/rc/15prompt30
1 files changed, 30 insertions, 0 deletions
diff --git a/.zsh/rc/15prompt b/.zsh/rc/15prompt
new file mode 100644
index 0000000..ea7b58a
--- /dev/null
+++ b/.zsh/rc/15prompt
@@ -0,0 +1,30 @@
+#--------------------
+# Terminal title
+#--------------------
+# also found somewhere
+prompt_eof_setup() {
+ # preexec() is run after you press enter on your command but before the command is run.
+ preexec() {
+ # define screen/terminal title with the current command (http://aperiodic.net/phil/prompt/)
+ case $TERM in
+ rxvt-unicode*)
+ printf '\33]2;%s\007' $1
+ ;;
+ screen*)
+ local CMD=${1[(wr)^(*=*|sudo|ssh|exec|-*)]}
+ printf '\ek%s\e\\' $CMD;;
+ esac
+ }
+}
+
+prompt_eof_setup "$@"
+
+#--------------------
+# Prompt
+#--------------------
+#PS1="[${fg_cyan}%*${fg_no_colour}] - ${fg_light_red}$USERNAME${fg_no_colour} ${fg_light_blue}%~${fg_no_colour} > "
+PS1="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} - ${fg_light_blue}%~${fg_no_colour}
+[${fg_cyan}%*${fg_no_colour}] > "
+
+## Spelling prompt
+SPROMPT='zsh: correct '%R' to '%r' ? ([Y]es/[N]o/[E]dit/[A]bort) '