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
function grml_control_xterm_title () {
case $TERM in
(xterm*|rxvt*)
function grml_control_xterm_title () {
case $TERM in
(xterm*|rxvt*)
- set_title "${(%):-"%n@%m:"}" "$1"
+ set_title "${(%):-"%n@%m:"}" "$2"