HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

c
csh(1) csh(1)
Diagnostic output can be directed through a pipe with the standard output. Simply use the form
|&
rather than | by itself.
CSH UTILITIES
File Name Completion
In typing file names as arguments to commands, it is no longer necessary to type a complete name, only a
unique abbreviation is necessary. When you want the system to try to match your abbreviation, press the
ESC key. The system then completes the file name for you, echoing the full name on your terminal. If the
abbreviation does not match an available file name, the terminal’s bell is sounded. The file name may be
partially completed if the prefix matches several longer file names. In this case, the name is extended up to
the ambiguous deviation, and the bell is sounded.
File name completion works equally well when other directories are addressed. In addition, the tilde (
˜)
convention for home directories is understood in this context.
Viewing a File or Directory List
At any point in typing a command, you can request "what files are available" or "what files match my
current specification". Thus, when you have typed:
% cd ˜speech/data/bench/fritz/
you may wish to know what files or subdirectories exist (in
˜speech/data/bench/fritz), without
aborting the command you are typing. Typing CTRL-
D at this point lists the files available. Files are listed
in multicolumn format, sorted by column. Directories and executable files are identified by a trailing
/
and *, respectively. Once printed, the command is re-echoed for you to complete. Additionally, you may
want to know which files match a prefix, the current file specification so far. If you had typed:
% cd ˜speech/data/bench/fr
followed by a CTRL-D, all files and subdirectories whose prefix was
fr in the directory
˜speech/data/bench
would be printed. Notice that the example before was simply a degenerate case
of this with a null trailing file name. (The null string is a prefix of all strings.) Notice also that a trailing
slash is required to pass to a new sub-directory for both file name completion and listing. Note that the
degenerate case
% ˜ˆD
prints a full list of login names on the current system.
Command Name Recognition
Command name recognition and completion works in the same manner as file name recognition and com-
pletion above. The current value of the environment variable PATH is used in searching for the command.
For example
% newa [Escape]
might expand to
% newaliases
Also,
% new [Control]-[D]
lists all commands (along PATH) that begin with new. As an option, if the shell variable listpathnum
is set, a number indicating the index in PATH is printed next to each command on a [Control]-[D] listing.
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.
Section 1144 Hewlett-Packard Company 16 HP-UX 11i Version 1: September 2005