David Christensen wrote on Friday, November 24, 2006 11:47 AM: > Deluigi Marcus wrote: >> ... which window is logged on on which machine. > > I include the hostname in my Bash prompt: > > 2006-11-24 08:06:17 [EMAIL PROTECTED] ~ > $ grep PS1 .bash_profile > export PS1='\D{%Y-%m-%d %H:%M:%S} [EMAIL PROTECTED] \w\n\$ '
Related, though not responsive to the OP's question, I include a variable, "ShellLevel", in PS1, which is set in .bashrc. ShellLevel="$(/bin/tty | /bin/tr -dc '0-9').$((${SHLVL}-1))" That puts a number of the form X.Y in the prompt, where X is unique for each window and Y increments by 1 for each subshell. I can keep track of windows and know whether or not typing "exit" will make the window disappear. If I've only one window open and no subshells, the prompt looks like this: 0.0 /c> (I've also got "\w" (the current working directory) in the prompt.) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/