It is currently Tue, 07 Dec 2021 02:03:57 GMT

Author Message
 setting xterm title in tcsh

I'm currently running tcsh as my main login shell, and I can't seem to
figure out how to set the prompt so that it will dynamicaly change the
title bar to show the current working directory.  I have looked in the
Xterm-Title minihowto, but it shows the escape sequences for bash and
they don't seem to work for tcsh.  I have been able to do it from a
shell prompt, but not from within a shellscript, or within the prompt
variable.  I have even set up an alias for the cd and related commands
that will constantely refresh the prompt variable, but to no avail.

PLEASE HELP!!  This is getting quite frustrating!

thanx in advance!  :-)

Andrew Nelson  
            President HCC Southwest Computer Club
- -- http://www.**-**.com/ ;  
" What the fool cannot learn he laughs at. Thinking that by
 his laughter he shows superiority, instead of latent idiocy."

 Tue, 04 Apr 2000 03:00:00 GMT   
 setting xterm title in tcsh

Put the following lines into your ~/.tcshrc:

--------- begin of lines ------------# a somewhat more comfortable
promptsetenv hostname `hostname | sed 's/\..*//g'`
alias Prompt 'set noglob; \\
               set prompt = "$hostname \! > " ;\\
               unset noglob'
# show current directory in xterm title bar
setenv CMD_ENV bsd
alias cwdcmd '/bin/echo -n "\033]2;${HOST}:$cwd\a\033]1;${HOST}\a"'
alias cd 'cd \!* ; Prompt'


--------- end of lines -----

You can omit the host information, if you like.
Hope this helps.

Cheers, Torsten.

 Tue, 04 Apr 2000 03:00:00 GMT   
   [ 2 post ] 

Similar Threads

1. tcsh xterm title bar quoting

2. Using tcsh prompt string in xterm title

3. display pwd in xterm title bar with tcsh

4. GETTING xterm title from tcsh

5. Dynamically changing xterm title bar in tcsh

6. xterm titles in tcsh (or csh)

7. set xterm icon/title?

8. xterm: Setting working directory as icon title

9. BASH: Set xterm title

10. set xterm title to last command executed

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software