Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: preexec and multi-line command.
- X-seq: zsh-users 14845
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Piotr Karbowski <jabberuser@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: preexec and multi-line command.
- Date: Sat, 20 Feb 2010 12:55:06 -0800
- In-reply-to: <6910cba01002201120v65fc6904j758d41de17839b86@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <6910cba01002201120v65fc6904j758d41de17839b86@xxxxxxxxxxxxxx>
On Feb 20, 8:20pm, Piotr Karbowski wrote:
}
} preexec () { print -Pn "\e]0;$1 [%n@%m: %~]\a"}
We had someone else just a couple of weeks ago posting about a similar
problem.
The issue is that when you expand $1 in that sequence, which is I
believe intended to set the terminal title, the string to which $1
expands may include characters (in this case probably newlines)
that interrupt the terminal's processing of the title-bar sequence.
This leaves the terminal in a state where it is still capturing the
subsequent output and interpreting it as control instructions, so
that output disappears.
Try replacing $1 with ${(fV)1} to avoid this. You might even want to
truncate the string placed in the title bar, e.g. ${(r:20:)${(fV)1}}.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author