diff options
Diffstat (limited to '_zsh/hooks.zsh')
-rw-r--r-- | _zsh/hooks.zsh | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/_zsh/hooks.zsh b/_zsh/hooks.zsh index 9e18053..defee0b 100644 --- a/_zsh/hooks.zsh +++ b/_zsh/hooks.zsh @@ -2,27 +2,33 @@ # zsh/hooks.zsh # -function precmd { - # vcs_info - # Put the string "hostname::/full/directory/path" in the title bar: +# Put the string "hostname::/full/directory/path" in the title bar: +function set_term_title { echo -ne "\e]2;$PWD\a" +} - # Put the parentdir/currentdir in the tab +# Put the parentdir/currentdir in the tab +function set_term_tab { echo -ne "\e]1;$PWD:h:t/$PWD:t\a" } - -function set_running_app { - printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a" +function precmd { + set_term_title + set_term_tab } -function preexec { - set_running_app -} -function postexec { - set_running_app -} +#function set_running_app { +# printf "\e]1; $PWD:t:$(history $HISTCMD | cut -b7- ) \a" +#} +# +#function preexec { +# set_running_app +#} +# +#function postexec { +# set_running_app +#} # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: # |