From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18295 invoked from network); 26 Apr 2002 01:47:43 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 26 Apr 2002 01:47:43 -0000 Received: (qmail 19156 invoked by alias); 26 Apr 2002 01:47:30 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4878 Received: (qmail 19141 invoked from network); 26 Apr 2002 01:47:28 -0000 Date: Fri, 26 Apr 2002 11:47:24 +1000 From: Geoff Wing To: Joshua Symons Cc: zsh-users@sunsite.dk Subject: Re: Preexec & Printf Message-ID: <20020426014724.GA18128@primenet.com.au> References: <20832251d4.251d420832@mysun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20832251d4.251d420832@mysun.com> User-Agent: Mutt/1.3.28i Organization: PrimeNet Computer Consultancy Joshua Symons typed: :----- Original Message ----- :From: Geoff Wing :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 : Rxvt Stuff : Zsh Stuff :