csh.1 (2010 09)
c
csh(1) csh(1)
Autologout
A new shell variable has been added called
autologout. If the terminal remains idle (no character
input) at the shell’s top level for a number of minutes greater than the value assigned to autologout,
you are automatically logged off. The
autologout feature is temporarily disabled while a command is
executing. The initial value of
autologout is 600. If unset or set to 0,
autologout is entirely dis-
abled.
Command Line Control
A
ˆR re-prints the current command line; ˆW
erases the last word entered on the current command line.
Sanity
C shell restores your terminal to a sane mode if it appears to return from some command in raw, cbreak,
or noecho mode.
Saving Your History Buffer
csh has the ability to save your history list between login sessions. If the shell variable
savehist is
set to a number, that number of command events from your history list is saved. For example, placing
the line
set history=10 savehist=10
in your .cshrc file maintains a history buffer of length 10 and saves the entire list when you logout.
When you log back in, the entire buffer is restored. The commands are saved in the file
.history in
your login directory.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the collating sequence used in evaluating pattern matching notation for file
name substitution.
LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification
of characters as letters, and the characters matched by character class expressions in pattern matching
notation.
LANG determines the language in which messages are displayed.
If
LC_COLLATE or LC_CTYPE is not specified in the environment or is set to the empty string, the value
of LANG is used as a default for each unspecified or empty variable. If LANG
is not specified or is set to
the empty string, a default of "C" (see lang (5)) is used instead of
LANG. If any internationalization vari-
able contains an invalid setting, csh behaves as if all internationalization variables are set to "C". See
environ (5).
LARGESCRIPTS, when defined, enables csh to execute scripts that are larger than 1 GB.
International Code Set Support
Single- and multi-byte character code sets are supported.
WARNINGS
The
.cshrc file should be structured such that it cannot generate any output on standard output or
standard error, including occasions when it is invoked without an affiliated terminal. rcp (1) causes
.cshrc to be sourced, and any output generated by this file, even to standard error causes problems.
Commands such as stty (1) should be placed in .login, not in .cshrc, so that their output cannot affect
rcp(1).
csh has certain limitations. Words or environment variables can be no longer than 10240 bytes. The
system limits argument lists to 10240 bytes. The number of arguments to a command which involves file
name expansion is limited to one-sixth the number of bytes allowed in an argument list. Command sub-
stitutions may substitute no more bytes than are allowed in an argument list.
To detect looping, the shell restricts the number of
alias substitutions on a single line to 20.
When a command is restarted from a stop,
csh prints the directory it started in if it is different from the
current directory; this can be misleading (i.e., wrong) because the job may have changed directories inter-
nally.
Shell built-in functions are not stoppable/restartable. Command sequences of the form
a;b;care
also not handled gracefully when stopping is attempted. If you interrupt b, the shell then immediately
executes c. This is especially noticeable if this expansion results from an alias. It suffices to place the
HP-UX 11i Version 3: September 2010 − 17 − Hewlett-Packard Company 17