X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: Terminal background color Date: Fri, 24 Nov 2006 17:56:59 -0500 Message-ID: <31DDB7BE4BF41D4888D41709C476B657041693CC@NIHCESMLBX5.nih.gov> In-Reply-To: <003d01c70fe8$31596540$0a00a8c0@s3000p> From: "Buchbinder, Barry \(NIH/NIAID\) [E]" To: "cygwin" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id kAOMvCSC019302 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 dpchrist AT s3000p ~ > $ grep PS1 .bash_profile > export PS1='\D{%Y-%m-%d %H:%M:%S} \u@\h \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/