tcsh is an enhanced version of the Berkeley UNIX C shell, csh, which was first developed in the late 1970s by Ken Greer at Carnegie-Mellon University. Work on it continued into the 1980s by Paul Placeway at Ohio State and since then many people have worked on the shell. It stands for "TENEX C SHell", although many people claim that it also stands for "Total C SHell". According to the man page, tcsh is a C shell with file name completion and command line editing.

What makes tcsh special is that it's backwards compatible with the C shell, but is more user friendly and has major improvements in command-line editing and history navigation. Like the bash shell, it has tab completion and a command history which is usually stored in the .history file. In addition to storing your command history, you can also manipulate it with the history command and options such as displaying your history, merging history files, and writing it to a new file. It is also similar to bash in its input and output redirection and pipe use.

Key bindings are an important feature of tcsh. The syntax of key bindings is: bindkey [option] <instring or keyname> <outstring or command>

Another feature which other shells seem to lack is a spell checking option. You have to know you made the mistake before you execute the command, but if you remember before you execute and don't feel like going back to fix it you can type "Esc-S" and the shell will try to correct your spelling.

tcsh features three levels of user prompts. First, the > prompt which indicates that the shell is waiting for you to enter in a command. The second level prompt, %R?, is displayed while the shell is in a while or for loop. The third-level prompt is used when the shell is correcting the spelling when you have the spelling correction feature turned on. Special character codes are supported at the prompts, like bash, but the syntax is different.

Examples of tcsh prompt character codes:


%/  This displays the directory you're working in

%h, %!, !  These codes are used to display the current history number

%t, %@  Both of these codes can be used to display what time it is

%d  This is the code for the current day of the week

%y  This code displays the current year
%n  This code displays the username you're logged in as

Common and useful tcsh commands:


alias  For setting and viewing aliases

bg  This comment forces suspended processes to run in the background

bindkey  For setting key bindings

cd  The change directory command

exit  Kills the shell

fg  This comment forces suspended processes to run in the foreground

history  For viewing and manipulating the .history file

kill  Used for killing a process

logout  Ends the login

set  For setting the value of the shell variables

source  This command is for reading and executing a file
unalias  Used to remove aliases


Sources:
http://www.indiana.edu/~swinfo/unixsys/csh.html
http://wihok.8m.com/linux/rhl12.htm

Log in or register to write something here or to contact authors.