holtz@strawdog.Eng.Sun.COM (Brian Holtz) (08/04/90)
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\!*\"' Does anyone know how to get this to work? -- Brian Holtz (holtz@netcord.Eng.Sun.COM)
holtz@strawdog.Eng.Sun.COM (Brian Holtz) (08/04/90)
In article <615@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\!*\"' postnews swallowed the escapes; I meant to say alias label 'echo -n "^[]l\!*^[\"' where ^[ means the escape character. -- Brian Holtz (holtz@netcord.Eng.Sun.COM)
chris@sage0.gsfc.nasa.gov (Chris P. Ross) (08/04/90)
In <616@exodus.Eng.Sun.COM> holtz@strawdog.Eng.Sun.COM (Brian Holtz) writes: >In article <615@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\!*^[\"' The problem is propbably just that tcsh is swolowing the Esc keys becuase they are bind'd to something that won't allow them through (like 'prefix-meta') so maybe if you did: bind self-insert-command Esc alias label 'echo -n "^[]l\!*^[\"' bind prefix-meta Esc (or, in the last line, replace "prefix-meta" with what your Esc key is bound to) This might work, just a guess. Let me know how it goes... - Chris -- -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=- Chris P. Ross (301)/286-7242 | InterNet: chris@sage0.gsfc.nasa.gov EGRET Programmer, NASA / GSFC | chris@olgao.umd.edu -=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
kaul@icarus.eng.ohio-state.edu (Rich Kaul) (08/04/90)
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