summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/functions/chpwd4
-rw-r--r--etc/options3
-rw-r--r--etc/prompt5
3 files changed, 7 insertions, 5 deletions
diff --git a/etc/functions/chpwd b/etc/functions/chpwd
index a375f04..cf71865 100644
--- a/etc/functions/chpwd
+++ b/etc/functions/chpwd
@@ -1,4 +1,4 @@
-## vim:set ft=zsh
+## vim:ft=zsh
psvar[1]=''
[[ -f .todo ]] && psvar[1]+='todo '
[[ -f .fehindex.jpg ]] && psvar[1]+='feh '
@@ -6,3 +6,5 @@ psvar[1]=''
[[ -d .git ]] && psvar[1]+='git '
[[ -d .svn ]] && psvar[1]+='svn '
[[ -f Makefile || -f makefile ]] && psvar[1]+='make '
+
+psvar[2]=$(rtab -f)
diff --git a/etc/options b/etc/options
index 49996fd..88f6151 100644
--- a/etc/options
+++ b/etc/options
@@ -9,9 +9,6 @@ setopt auto_pushd pushd_ignore_dups pushd_minus pushd_silent
# enter "foobar" to cd foobar, and "derf" to cd ~derf
setopt auto_cd
-# To use rtab within the prompt
-setopt prompt_subst
-
# Try to correct typos in command names
setopt correct
diff --git a/etc/prompt b/etc/prompt
index 2a1f38f..c948f5d 100644
--- a/etc/prompt
+++ b/etc/prompt
@@ -3,10 +3,13 @@
# RPS1 is on the right side of the terminal
# The \ek\e\\ is for screen's 'shelltitle'
+# psvar[1] = directory info
+# psvar[2] = rtab (current directory)
+
user="${ps_yellow}%n"
at="@"
host="%m"
-dir="${ps_reset}%25>…>\$(rtab -f)%>>"
+dir="${ps_reset}%25>…>%2v%>>"
sign="%(!.${ps_red}#.${ps_green}>)${ps_reset}"
screen=$'%{\ek\e\\%}'