From 46ac6b2c967768aafe50a5446aab2241ddbcff69 Mon Sep 17 00:00:00 2001 From: hugues Date: Sun, 20 Aug 2006 19:50:12 +0000 Subject: Grand ménage dans la conf Zsh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@255 a0e5b806-a6f9-0310-978d-cbce73f8a913 --- 80_Functions.zsh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to '80_Functions.zsh') 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" } -- cgit v1.2.3