diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-05-22 17:06:44 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-05-22 17:06:44 +0200 |
commit | bb76357c72d67b5eab803fccce27617d178f7ed3 (patch) | |
tree | 98ac1e81a0009e8977dce05bb1982e1d442bcee6 | |
parent | c0850c6ae59422afc306856c14da6de5d89680f7 (diff) |
Personnalized non-UTF8 title for PuTTY terms.
Don't forget to set "TERM" to "putty" when needed...
-rw-r--r-- | 01_Functions.zsh | 2 | ||||
-rw-r--r-- | 12_Prompts.zsh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index af6423c..d4c77bf 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -29,7 +29,7 @@ term_title() sun-cmd) print -Pn "\e]l%n@%m %~$1\e\\" # Never tested.. ;; - *term*|rxvt*) + *term*|rxvt*|putty) print -Pn "\e]0;%n@%m (%l) %~$1\a" # Sets term title ;; screen) diff --git a/12_Prompts.zsh b/12_Prompts.zsh index c8c0eca..b6cf511 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -24,7 +24,8 @@ set_prompt_colors $prompt_colors[generic] preexec () { - term_title " ··· $(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g')" + local my_sep=$([ "$TERM" = "putty" ] && echo "---" || echo "···") + term_title " $my_sep $(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g')" print -Pn "$C_$prompt_colors[exec]$_C" } |