From: cantandwont <52587695+cantandwont@users.noreply.github.com> Date: Mon, 15 Jul 2019 09:42:36 +0000 (+1000) Subject: zshrc: fix urxvt multi-line issue X-Git-Tag: v0.16.1~2 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=0c9e97b682fd575b995f084965e58cd750c90915 zshrc: fix urxvt multi-line issue Quoting from #74: | When running multiline commands in urxvt, parts of the command are re-echoed. | | Example: | | me@system ~/foo % ls \ | \`> -l | | -ltotal 0 | -rw-r--r-- 1 me users 0 Feb 27 20:36 bar1 | -rw-r--r-- 1 me users 0 Feb 27 20:36 bar2 | | me@system ~/foo % | | Note the '-l' be re-echoed in front of 'total'. Quoting from zshmisc(1): | preexec | | Executed just after a command has been read and is about to be | executed. If the history mechanism is active (regardless of | whether the line was discarded from the history buffer), | the string that the user typed is passed as the first | argument, otherwise it is an empty string. The actual command | that will be executed (including expanded aliases) is passed | in two different forms: the second argument is a | single-line, size-limited version of the command (with things | like function bodies elided); the third argument contains the | full text that is being executed. Closes: #74 --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 21db9e7..54e0649 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2525,7 +2525,7 @@ function grml_cmd_to_screen_title () { function grml_control_xterm_title () { case $TERM in (xterm*|rxvt*) - set_title "${(%):-"%n@%m:"}" "$1" + set_title "${(%):-"%n@%m:"}" "$2" ;; esac }