Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!decwrl!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!quanta.eng.ohio-state.edu!icarus!kaul From: kaul@icarus.eng.ohio-state.edu (Rich Kaul) Newsgroups: comp.unix.questions Subject: Re: ?: tcsh escape for retitling cmdtool Message-ID: Date: 3 Aug 90 19:11:33 GMT References: <615@exodus.Eng.Sun.COM> <616@exodus.Eng.Sun.COM> Sender: news@quanta.eng.ohio-state.edu Organization: Ohio State University Electrical Engineering Lines: 40 Nntp-Posting-Host: icarus In-reply-to: holtz@strawdog.Eng.Sun.COM's message of 3 Aug 90 17:40:41 GMT Originator: kaul@icarus.eng.ohio-state.edu In article <616@exodus.Eng.Sun.COM> holtz@strawdog.Eng.Sun.COM (Brian Holtz) writes: The following alias (for retitling a cmdtool or shelltool) works in csh but hangs tcsh when the alias is invoked: alias label 'echo -n "^[]l\!*^[\"' It's reasonably easy. I mentioned this bug (or difference from Sun's csh handling of the escape sequences) to Paul Placeway some time ago. The solution is to drop something at the end of the command. Here's what I placed in my .cshrc for use with tcsh (I have since switched to bash, but that's another story). # # Prompting information. # if ($?DISPLAY) then # X Windows Prompt alias cwdcmd 'echo -n "^[]0;"{$HOST}":$cwd^G"' echo -n "^[]0;"{$HOST}":$cwd^G" set prompt="%h> " if ($?uid) then if ($uid == 0) set prompt="%S%t>%s " endif # Suntools Prompting else if ($?WINDOW_PARENT || ($TERM == "sun" && `tty` != "/dev/console")) then alias cwdcmd 'echo -n "^[]l"{$HOST}": $cwd^[\^A"' echo -n ^[\]l"$HOST": $cwd^[\\ set prompt="%h> " if ($?uid) then if ($uid == 0) set prompt="%S%t>%s " endif else # Everything else set prompt={$HOST}":%~> " if ($?uid) then if ($uid == 0) set prompt={$HOST}":%S%/>%s " endif endif -- Rich Kaul | "Do not do unto others as you would that kaul@icarus.eng.ohio-state.edu | they should do unto you. Their tastes or ...!osu-cis!kaul | may differ." -Bernard Shaw