diff options
-rw-r--r-- | 01_Functions.zsh | 9 | ||||
-rw-r--r-- | 12_Prompts.zsh | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index 7c8ac0b..534c2ed 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -27,14 +27,15 @@ term_title() [[ -t 1 ]] && case $TERM in sun-cmd) - print -Pn "\e]l%n@%m %~$1\e\\" # Never tested.. + print -Pn "\e]l%n@%m %~$@\e\\" # Never tested.. ;; *term*|rxvt*|putty) - print -Pn "\e]0;%n@%m (%l) %~$1\a" # Sets term title + print -Pn "\e]0;%n@%m (%l) %~$@\a" # Sets term title ;; screen) - print -Pn "\e]2;[SCREEN] %n@%m (%l) %~$1\a" # Sets term title - print -Pn "\ek%n@%m (%l) %~$1\e\\" # Sets screen title + print -Pn "\e]2;[SCREEN #n] %n@%m (%l) %~$@\a" # Sets hardstatus line (term title) + [ $# -gt 0 ] && shift # discards separator + print -Pn "\ek${@:-%n@%m (%l) %~}\e\\" # Sets screen title ;; *) ;; diff --git a/12_Prompts.zsh b/12_Prompts.zsh index 4151f32..8aa70c6 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -56,8 +56,7 @@ expand_text() preexec () { - local my_sep="---" - term_title " $my_sep $(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g')" + term_title " --- " "$(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g;s/;$//')" print -Pn "$C_$prompt_colors[exec]$_C" local lines="$(expand_text "$PROMPT$1" | sed "s/\\(.\{$COLUMNS\}\\)/\\1\\n/g" | wc -l)" |