From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18098 invoked from network); 26 Apr 2002 01:35:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Apr 2002 01:35:00 -0000 Received: (qmail 15715 invoked by alias); 26 Apr 2002 01:34:40 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4875 Received: (qmail 15703 invoked from network); 26 Apr 2002 01:34:38 -0000 From: "Joshua Symons" To: mason@primenet.com.au Cc: zsh-users@sunsite.dk Message-ID: <20832251d4.251d420832@mysun.com> Date: Thu, 25 Apr 2002 20:31:56 -0500 X-Mailer: Netscape Webmail MIME-Version: 1.0 Content-Language: en Subject: Re: Preexec & Printf X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 7bit ----- Original Message ----- From: Geoff Wing Date: Thursday, April 25, 2002 8:22 pm Subject: Re: Preexec & Printf > Joshua Symons typed: > : I have a pretty generic problem, but I can't seem to make my way > around: it. Here is an example of what is happening: > > : [(ichirou:151:pts/15)~ %] which preexec > : preexec () { > : print -Pn "\e]0;%m:%l - $* \a" > :} > : [(ichirou:152:pts/15)~ %] printf '^[[32;40mwith quotes\n' > > : For echo, print, and printf, my '' is getting passed (straight > quote): into preexec and erroring back out into my shell. I can't > seem to get > : around the quotes that are passed into preexec. This doesn't > happen in > : dtterm for some reason, not sure why. > : Any help that could be given would be nice. > > Your problem is different to what you think. You're using xterm and > you're expecting it to not print the set of characters sent through > thepreexec without consideration of what characters are permissible. > 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? > normal line because it'll terminate the title-set OSC in the print > in the OSC ? > 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. > > Regards, > -- > Geoff Wing : > Rxvt Stuff : > Zsh Stuff : >