Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Preexec & Printf
- X-seq: zsh-users 4878
- From: Geoff Wing <gcw@xxxxxxx>
- To: Joshua Symons <vmcore@xxxxxxxxx>
- Subject: Re: Preexec & Printf
- Date: Fri, 26 Apr 2002 11:47:24 +1000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20832251d4.251d420832@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: PrimeNet Computer Consultancy
- References: <20832251d4.251d420832@xxxxxxxxx>
Joshua Symons <vmcore@xxxxxxxxx> typed:
:----- Original Message -----
:From: Geoff Wing <mason@xxxxxxxxxxxxxxx>
:Date: Thursday, April 25, 2002 8:22 pm
:Subject: Re: Preexec & Printf
:
:> Obviously you'll have problems if you try to send a BEL (\a) via the
:I was actually using the example provided in the xterm title setting
:how-to.
:Is there a better way to terminate the title?
No, I mean, if you try to send a line like:
% echo "hi\athere"
then the BEL will terminate the string sent via the preexec and ``there''
won't end up in the title but will be sent normally onto the display.
:> normal line because it'll terminate the title-set OSC in the print
:> in the
:OSC ?
OSC=Operating System Command, a terminal (emulator) specific char sequence.
In this case, the ESC ] 0 . . . ST sequence to set the title.
:> preexec(). You'll also have problems with xterm with other non-
:> printablecharacters, e.g. ESC, CR, LF - xterm will also use those
:> as terminators
:> since they're non-valid. You'll need to do some more character
:> sanitisation first on the string sent via the preexec() print.
AFAIK, you'll still have problems even using the ${(QV)1} sequence because
it gets the line in a raw form - but the print parses it. e.g.
% echo "hi\nthere"
will fail because the V operator won't be effective since \n are just two
characters but the print command in the preexec converts it to one
special non-printable character which terminates the title-set OSC.
Regards,
--
Geoff Wing : <gcw@xxxxxxxxx>
Rxvt Stuff : <gcw@xxxxxxxx>
Zsh Stuff : <gcw@xxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author