This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OK, I'm a newbie in CYGWIN... How to do title?

> I promise, I checked the archives and docs and don't see anything on
> this...
> Can someone share how I perform the equivalent of the NT 'title'
> command on a CYGWIN window??   I've got 4-6 CYGWIN windows open - each
> tailing a certain log file.  Only problem is its not obvious which
> window is which log file!  What I need is to do something like:
> $title "Logfile1"
> tail -f logfile1.log

While this is not Cygwin-specific, I got curious how linux does this since
I've noticed the TERM setting effects whether my title is set in rxvt. From
my RH-7.2 box's /etc/bashrc (spacing will probably be screwed up):
case $TERM in
            if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
            PROMPT_COMMAND='echo -ne
            [ -e /etc/sysconfig/bash-prompt-default ] &&

[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

and, from "man bash":

   If set, the value is executed as a command prior to
   issuing each primary prompt.

My personal favorite thing to do is put the current time:

export PS1=$PS1"\[\e]0;[\t]\a\]"

Note that this will screw you up if you use the full-screen console on Linux
unless you protect the TERM=linux. As for Cygwin, though, it works in both the
cmd-console and rxvt.

Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]