Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An simpler alternative for tcsh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An simpler alternative for tcsh
Authored by: leo on May 24, '01 04:54:08PM

In tcsh you do not need to modify the prompt in order to change the window title.
You may use an alias called cwdcmd. tcsh will execute this alias whenever the cd
command is executed. Here are two aliases to accomplish this task.

alias settitle 'echo -n "^[]2;"!*"^G"'
alias cwdcmd 'settitle $cwd'

I personally use the following command, which will do an ls and change
the window title everytime I move to a new directory.

alias cwdcmd 'ls ; settitle $cwd'

and here is an example to modify the prompt using an environment variable.
Now your promt will always contain the login name and the trailing component
of $cwd.

set prompt="$USER[%c]: "

You may get the above mentioned commands by downloading files aliases.mine and
environment.mine from my shared folder (copy them to ~/Library/init/tcsh).

http://homepage.mac.com/leozimmermann/FileSharing.html



[ Reply to This | # ]