Up Next Previous

Special aliases (+)

If set, each of these aliases executes automatically at the indicated time. They are all initially undefined.

Runs when the shell wants to ring the terminal bell.

Runs after every change of working directory. For example, if the user is working on an X window system using xterm(1) and a re-parenting window manager that supports title bars such as twm(1) and does

> alias cwdcmd 'echo -n "^[]2;${HOST}:$cwd ^G"'

then the shell will change the title of the running xterm(1) to be the name of the host, a colon, and the full current working directory. A fancier way to do that is

> alias cwdcmd 'echo -n "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'

This will put the hostname and working directory on the title bar but only the hostname in the icon manager menu.

Note that putting a cd, pushd or popd in cwdcmd may cause an infinite loop. It is the author's opinion that anyone doing so will get what they deserve.

Runs every tperiod minutes. This provides a convenient means for checking on common but infrequent changes such as new mail. For example, if one does

> set tperiod = 30
> alias periodic checknews

then the checknews(1) program runs every 30 minutes. If periodic is set but tperiod is unset or set to 0, periodic behaves like precmd.

Runs just before each prompt is printed. For example, if one does

> alias precmd date

then date(1) runs just before the shell prompts for each command. There are no limits on what precmd can be set to do, but discretion should be used.

Specifies the interpreter for executable scripts which do not themselves specify an interpreter. The first word should be a full path name to the desired interpreter (e.g. `/bin/csh' or `/usr/local/bin/tcsh').

Up Next Previous