zsh-users
 help / color / mirror / code / Atom feed
From: Geoff Wing <gcw@zsh.org>
To: Joshua Symons <vmcore@mysun.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Preexec & Printf
Date: Fri, 26 Apr 2002 11:47:24 +1000	[thread overview]
Message-ID: <20020426014724.GA18128@primenet.com.au> (raw)
In-Reply-To: <20832251d4.251d420832@mysun.com>

Joshua Symons <vmcore@mysun.com> typed:
:----- Original Message -----
:From: Geoff Wing <mason@primenet.com.au>
: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@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>


  reply	other threads:[~2002-04-26  1:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26  1:31 Joshua Symons
2002-04-26  1:47 ` Geoff Wing [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-26  2:10 Joshua Symons
2002-04-26  1:54 Joshua Symons
2002-04-26  2:06 ` Bart Schaefer
2002-04-26  1:25 Joshua Symons
2002-04-26  1:45 ` Bart Schaefer
2002-04-26  9:21   ` Oliver Kiddle
2002-04-26  1:07 Joshua Symons
2002-04-26  1:16 ` Bart Schaefer
2002-04-26  1:19   ` Bart Schaefer
2002-04-26  0:47 Joshua Symons
2002-04-26  1:01 ` Bart Schaefer
2002-04-26  1:22 ` Geoff Wing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020426014724.GA18128@primenet.com.au \
    --to=gcw@zsh.org \
    --cc=vmcore@mysun.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).