[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Prompt in Bash



Will Lowe <lowe@cis.udel.edu> writes:

> If I do this:
> 
> On 5 Sep 1997, Rob Browning wrote:
> 
> >     set_titlebar () { echo -n "]2;$*"; }
> >     export -f set_titlebar
> 
> 	And then someplace call "set_titlebar",  I just get ^[]2;$*^G
> echoed to my terminal.  It doesn't ever set the titlebar.  I'm using rxvt.
> Suggestions?

Uhm, oops, my fault.  There were 8-bit characters in that script that
I didn't mention.  I don't know what you saw, but what you should have
seen was:

    set_titlebar () { echo -n "^[]2;$*^G"; }

Here ^[ and ^G actually have to be real control characters not a ^
followed by a G or [.  To type these into a file in emacs, you can use
C-q C-g for ^G and C-q C-[ for ^[.  If this doesn't make sense to you,
ask and I'll explain in more detail.  You can get the same effect from
a bash prompt with C-q Cv:

  quoted-insert (C-q, C-v)
              Add  the  next  character that you type to the line
              verbatim.  This is how to  insert  characters  like
              C-q, for example. 

Let me know if this doesn't help.
-- 
Rob


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: