Chapter 21. tcsh: An Extended C Shell
This
chapter describes tcsh, an enhanced version of
the C shell. tcsh is also used as the C shell;
in that case, the tcsh features described in
this chapter work even when you run csh. The C
shell was so named because many of its programming constructs and
symbols resemble those of the C programming language.
The
default shell is bash. However, earlier versions
of Mac OS X used tcsh as the default shell. If
you want to use tcsh, you first need to change
your default. To change your default shell, launch the Terminal
application (/Applications/Utilities), and then
change the shell to /bin/tcsh in the
Terminal’s Preferences (Terminal→Preferences).
Overview of Features
Features of tcsh include:
Input/output redirection
Wildcard characters (metacharacters) for filename abbreviation
Shell variables for customizing your environment
Integer arithmetic
Access to previous commands (command history)
Command-name abbreviation (aliasing)
A built-in command set for writing shell programs
Job control
Command-line editing and editor commands
Word completion (tab completion)
Spellchecking
Scheduled events, such as logout or terminal locking after a set idle period and delayed commands
Read-only variables
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access