summaryrefslogtreecommitdiff
path: root/80_Functions.zsh
diff options
context:
space:
mode:
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"
}