Hi all,
Does anyone know how to ammend the .cshrc file in $HOME for your session to display the path as part of the command line? So that I dont need to keep on typing pwd to see where I am?
thanks
Ocelot
Hi all,
Does anyone know how to ammend the .cshrc file in $HOME for your session to display the path as part of the command line? So that I dont need to keep on typing pwd to see where I am?
thanks
Ocelot
Search for PS1 in the forums. Here is one
Moderators,
csh does not dealt with prompts in the same way as a bourne based shell.
There are two way to set this in a csh/tcsh shell.
in csh you would have to do something like this in your .cshrc
alias precommand 'set prompt="${cwd} >"'
precommand # to set the initial prompt
alias cd 'chdir \!* && precommand'
gives:
/var/tmp/templog >
In tcsh you would add %/ to the prompt options for example:
set prompt="%m{%n} %/ >"
would give:
myhost{reborg} /var/tmp/templog >