From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17878 invoked from network); 26 Apr 2002 01:22:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Apr 2002 01:22:58 -0000 Received: (qmail 12924 invoked by alias); 26 Apr 2002 01:22:42 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4873 Received: (qmail 12913 invoked from network); 26 Apr 2002 01:22:39 -0000 To: zsh-users@sunsite.dk Path: not-for-mail From: Geoff Wing X-Newsgroups: lists.zsh.users Subject: Re: Preexec & Printf Date: Fri, 26 Apr 2002 01:22:34 +0000 (UTC) Organization: PrimeNet Computer Consultants Message-ID: References: <2565c1e9b2.1e9b22565c@mysun.com> Reply-To: mason@primenet.com.au NNTP-Posting-Host: localhost.primenet.com.au X-Trace: coral.primenet.com.au 1019784154 17391 127.0.0.1 (26 Apr 2002 01:22:34 GMT) X-Complaints-To: usenet@coral.primenet.com.au NNTP-Posting-Date: Fri, 26 Apr 2002 01:22:34 +0000 (UTC) User-Agent: slrn/0.9.7.4 (NetBSD) 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 the preexec without consideration of what characters are permissible. Obviously you'll have problems if you try to send a BEL (\a) via the normal line because it'll terminate the title-set OSC in the print in the preexec(). You'll also have problems with xterm with other non-printable characters, 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 :