🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36865

Re: changing titles

#36865
From: Chuck Ocheret
Date: Tue, 13 Feb 1990 19:27
25 lines
1289 bytes
Here is some Korn Shell code in my .envfile which sets up my prompt
to set the title to hostname followed by cwd; easily converted for
other shells.

	PS1="$(hostname) "'${PWD}'
	if [[ $(whoami) = root ]]
	then PEND='!#'
	else PEND='!$'
	fi
	if [[ ${TERM} = xterm ]]
	then PS1="];${PS1}${PEND}"
	else PS1="${PS1} ${PEND}"
	fi

The only problem with this is that my console window no longer says CONSOLE.
Does anyone know (under SUNOS) how to determine if a window is currently
the console window?

~chuck

-- 
 +------------------+   Chuck Ocheret, Sr. Staff Engineer   +-----------------+
 | chuck@Morgan.COM |       Morgan Stanley & Co., Inc.      | (212) 703-4474  |
 |   Duty now ...   |19th Floor, 1251 Avenue of the Americas| for the future. |
 +------------------+       New York, N.Y.  10020 USA       +-----------------+
Technical Details
Message-ID: <728@s5.Morgan.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mstan!chuck
References: <NIERMANN.90Feb11143721@grumpy.csg.uiuc.edu> <4869@amelia.nas.nasa.gov> <107@minya.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mstan!chuck
From: chuck@Morgan.COM (Chuck Ocheret)
Newsgroups: comp.windows.x
Subject: Re: changing titles
Message-ID: <728@s5.Morgan.COM>
Date: 13 Feb 90 19:27:47 GMT
References: <NIERMANN.90Feb11143721@grumpy.csg.uiuc.edu> <4869@amelia.nas.nasa.gov> <107@minya.UUCP>
Reply-To: chuck@Morgan.COM (Chuck Ocheret)
Distribution: comp.windows.x
Organization: Morgan Stanley and Co., NY, NY
Lines: 25