On 03/30/2010 02:13 PM, Roe, Kevin L. wrote:
> I played with the default prompt to understand how it got the titlebar 
> working because mine didn’t.  I figured out which part does it:
> \[\e]0;$(pwd)\a\]\n 
> Where:
> \[
Tell bash that you are starting a sequence of non-printing characters,
that should not affect layout of the prompt within your terminal.

> \e]0;    starts it

Start of terminal control command sequence.  \e is also \033.

> And:
> \a

End of terminal control command sequence.  \a is also \007.

> \]

Tell bash that you are done with non-printing characters.

> \n     ends it

Actually, that's part of your literal prompt, and has nothing to do with
the terminal title.

> And everything in between:
> $(pwd)     is the title 
> 
> But I couldn't find references to those character sequences anywhere.  Could 
> you explain what they mean?

Then you didn't search in the right places.
http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
This is not cygwin-specific.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to