Customizing your PROMPT
Your prompt is determined by the 'prompt' variable which is
set for you in your .cshrc file. By default your prompt is
set to "athena% " however, you can change it to any string
you wish. You can experiment with different prompts by
simply typing:
set prompt = 'something'
at your existing prompt. Once you are happy with your
prompt, then you can add the set prompt command to your
.cshrc.mine configuration file.
Here are some of the available codes you can use in your prompt; for a
more complete description and explanation, type "man tcsh" at your
prompt.
%/ Current working directory (cwd).
%~ or %d cwd, replacing $HOME by ~.
%c or %. Trailing component of cwd, replacing $HOME with ~.
%C Trailing component of cwd, no ~ substitution.
%h, %!, ! Current history event number.
%M The full machine hostname.
%m The hostname up to the first ".".
%S (%s) Start (stop) standout mode.
%B (%b) Start (stop) boldfacing mode.
%U (%u) Start (stop) underline mode.
%t or %@ Current time of day, in 12-hour, am/pm format.
%T Current time of day, in 24-hour format.
%% A single %.
%n The user name, contents of $user.
%k The weekday in <Day> format.
%D The day in dd format.
%w The month in <Mon> format.
%W The month in mm format.
%y The year in yy format.
%Y The year in yyyy format.
%l The line (tty) the user is logged on.
%L clear from prompt to end of display or end of line.
%# A `#' if tcsh is run as a root shell,
a `>' if not.
\n prints a new line
\t prints a tab
Therefore:
athena% set prompt = '[%m:%d]\nathena% '
Will produce:
[w20-575-13:~/Mail/inbox]
athena%
|