
Putting Text in Window Title Bars - abennett
http://www.itworld.com/operating-systems/80121/putting-text-window-title-bars
======
makecheck
The article mentions that the OS and shell matter, but I think this is mainly
due to differences in the behavior of "echo". The "printf" program is at least
consistent.

What actually matters for this is the declared terminal type, and the terminal
program you're using.

In this case, the article uses sequences I don't recognize and doesn't specify
what terminal is supposed to support them. None of their echoes work for me.

But perhaps a more common and supported approach is xterm:

\- use a terminal program that supports and declares the right type, e.g.
"xterm-color"

\- use xterm-style title sequences, and "printf" to print them, such as:

    
    
      printf "\033]; `pwd` \007"

------
_dan
I use a little perl script, because it works everywhere I need it (and I suck
at shell scripting ;))

    
    
        > cat `which title`
        #!/usr/bin/perl
        print(
            "\x1b",
            "]2;",
            join(' ', @ARGV),
            "\x7",
        );

