summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-08-04 16:45:58 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-08-04 16:45:58 +0200
commit6f54dea1ee26efcc27636bc618a5a49b1935ed91 (patch)
treefc08a56d21bec27f685d39fc1c665ed045f905a2 /etc
parent98cee3de3187f05107d4c4d2d3a502d2d4adc021 (diff)
etc/prompt: Use psvar so the prompt does not need to be re-sourced
Diffstat (limited to 'etc')
-rw-r--r--etc/functions/chpwd15
-rw-r--r--etc/prompt2
2 files changed, 8 insertions, 9 deletions
diff --git a/etc/functions/chpwd b/etc/functions/chpwd
index fd8feba..463e771 100644
--- a/etc/functions/chpwd
+++ b/etc/functions/chpwd
@@ -1,8 +1,7 @@
-pstags=''
-[ -f .todo ] && pstags+='todo '
-[ -f .fehindex.jpg ] && pstags+='feh '
-[ -d .hg ] && pstags+='hg '
-[ -d .git ] && pstags+='git '
-[ -d .svn ] && pstags+='svn '
-[ -f Makefile -o -f makefile ] && pstags+='make '
-source $ZDIR/prompt
+psvar[1]=''
+[ -f .todo ] && psvar[1]+='todo '
+[ -f .fehindex.jpg ] && psvar[1]+='feh '
+[ -d .hg ] && psvar[1]+='hg '
+[ -d .git ] && psvar[1]+='git '
+[ -d .svn ] && psvar[1]+='svn '
+[ -f Makefile -o -f makefile ] && psvar[1]+='make '
diff --git a/etc/prompt b/etc/prompt
index b45b35f..9633b72 100644
--- a/etc/prompt
+++ b/etc/prompt
@@ -3,4 +3,4 @@
# RPS1 is on the right side of the terminal
# The \ek\e\\ is for screen's 'shelltitle'
export PS1="${ps_yellow}%n@%m${ps_reset} %c %(!.${ps_red}#.${ps_green}>)${ps_reset} "$'%{\ek\e\\%}'
-export RPS1="${ps_yellow}[${ps_info}${pstags}${ps_yellow}%T]${ps_reset}"
+export RPS1="${ps_yellow}[${ps_info}%1v${ps_yellow}%T]${ps_reset}"