summaryrefslogtreecommitdiff
path: root/80_Functions.zsh
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2006-08-20 19:50:12 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:09 +0100
commit46ac6b2c967768aafe50a5446aab2241ddbcff69 (patch)
tree05c0007a21eaf529518e2bd77f4fb18170139986 /80_Functions.zsh
parent01b231dc56c2335481644728405c7aba037f1f5e (diff)
Grand ménage dans la conf Zsh
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@255 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '80_Functions.zsh')
-rw-r--r--80_Functions.zsh23
1 files changed, 17 insertions, 6 deletions
diff --git a/80_Functions.zsh b/80_Functions.zsh
index 8940c9e..add97cf 100644
--- a/80_Functions.zsh
+++ b/80_Functions.zsh
@@ -9,25 +9,36 @@
## these files with or without this notice.
##
-[[ -t 1 ]] &&
-chpwd()
+term_title()
{
+ [[ -t 1 ]] &&
case $TERM in
sun-cmd)
- print -Pn "\e]l%n@%m %~\e\\" ;;
+ print -Pn "\e]l%n@%m %~$1\e\\" ;;
*xterm*|rxvt|(k|E|dt)term|gnome-terminal)
- print -Pn "\e]0;%n@%m (%l) %~\a" ;;
+ print -Pn "\e]0;%n@%m (%l) %~$1\a" ;;
esac
- #print -P "%(/,%78>...>%/,%//)%b"
+}
+
+_chpwd()
+{
+ term_title
+}
+
+chpwd()
+{
+ _chpwd
+ which todo 2>&1 > /dev/null && todo
}
precmd ()
{
## [[ -t 1 ]] &&
# print -nP "%(?,,%{%}Foirage n°%{%}%?\n)%{%}"
+ _chpwd
}
preexec ()
{
- #nothing :)
+ term_title " $1"
}