Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: preexec and multi-line command.
- X-seq: zsh-users 14847
- From: Piotr Karbowski <jabberuser@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: preexec and multi-line command.
- Date: Sun, 21 Feb 2010 09:45:06 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=yTHjNrdnvGV0akfU2TZsFUzI/Po4NcX2vqmw/G/5QtM=; b=dosNKXZWcndihXrHH5Jr6/9aoWb8+t2qMN+zI+j54B2rdNM4VUUyv+UtRZKtnq0VIg f5SQXn6zpOsHQVsQg1BJpys36G+twyvoJjlpZZqptxvqviKgWjtYmXdsxE91k5C/Pacx dnJ3uZr2hGcUEdveYBFKw3FkWb6q/KEJw6N4A=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=C1ZJ02yc4mhcdk9JL+1X+5+u+GdiT+TfI/oB+W2992YbunpjV3OZFHaYEkDifEXxjz G26pI+YKMuVwnMhW0ZgTK4rLQOfiRizdyKM8+nJLUD2bxN3tsyn2NSsnn8Q8UhYJyJ0j Yna6ffNlu4XIrxcMqt8KWw7QxBm7Mdu39w9n0=
- In-reply-to: <100220125506.ZM30666@xxxxxxxxxxxxxxxxxxxxxx>
- 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> <100220125506.ZM30666@xxxxxxxxxxxxxxxxxxxxxx>
On Sat, Feb 20, 2010 at 9:55 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> 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}}.
Thanks, ${(fV)1} is solution.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author