Path: 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: <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 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 +-----------------+