Predefined Shell Variables
Variables can be set in one of two ways; by assigning a value:
setvar=value
or by simply turning the variable on:
set varThe latter case is useful for simple “Is the variable set?” kinds of tests.
In the following list, variables that accept values are shown
with the equals sign followed by the type of value they accept; the
value is then described. (Note, however, that variables such as
argv, cwd, and status are never explicitly assigned.) For
variables that are turned on or off, the list describes what they do
when set. tcsh automatically sets (and, in some cases, updates) the
variables addsuffix, argv, autologout, command, csubstnonl, cwd, dirstack, echo-style, edit, gid, home, loginsh, logout, owd, path, prompt, prompt2, prompt3, shell, shlvl, status, tcsh, term, tty, uid, user, and version.
-
addsuffix Append
/to directories and a space to files during tab completion to indicate a precise match.-
afsuser Set value to be used instead of the local username for Kerberos authentication with the
autologoutlocking feature.-
ampm Display all times in 12-hour format.
-
argv=(args) List of arguments passed to current command; default is
().-
autocorrect Check spelling before attempting to complete commands.
-
autoexpand Expand history (such as
!references) during command completion.autolist[=ambiguous]Print possible completions when correct one is ambiguous. If
ambiguousis specified, print possible completions only when completion adds no new characters.-
autologout=( ...
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