From 441c82846f60949421a49f795e114bab2ad191d2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 21 Sep 2008 09:53:22 +0200 Subject: Moved rtab into chpwd --- etc/functions/chpwd | 4 +++- etc/options | 3 --- etc/prompt | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'etc') 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\\%}' -- cgit v1.2.3