--- /dev/null
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+N\bNA\bAM\bME\bE
+ tcsh - C shell with file name completion and command line
+ editing
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+ t\btc\bcs\bsh\bh [ -\b-b\bbc\bcd\bde\bef\bfF\bFi\bil\blm\bmn\bnq\bqs\bst\btv\bvV\bVx\bxX\bX -\b-D\bDn\bna\bam\bme\be[\b[=\b=v\bva\bal\blu\bue\be]\b] ] [ _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt ...
+ ]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ _\bT_\bc_\bs_\bh is an enhanced version of the Berkeley UNIX C shell
+ _\bc_\bs_\bh(1). It behaves exactly like the C shell, except for
+ the added utilities of:
+
+ 1) Command line editing using Emacs-style commands.
+
+ 2) Visual step up/down through the history list.
+
+ 3) Terminal mode sanity checking and resetting.
+
+ 4) Interactive command, file name and user name comple-
+ tion.
+
+ 5) File/directory/user list in the middle of a typed
+ command.
+
+ 6) Spelling correction of command, file, and user
+ names.
+
+ 7) Lookup of command documentation in the middle of a
+ typed command.
+
+ 8) Enhanced history mechanism.
+
+ 9) Automatic locking/logout after long periods of idle
+ time.
+
+ 10) Automatic execution of a single command prior to
+ printing each prompt.
+
+ 11) Automatic periodic command execution.
+
+ 12) A new syntax for the prompt, and the ability to set
+ the prompt for "while" and "for" loops.
+
+ 13) Time stamps in the history list.
+
+ 14) An addition to the syntax of filenames to access
+ entries in the directory stack, and the ability
+ treat symbolic links in a sane way when changing
+ directories.
+
+ 15) The ability to watch for logins and logouts by user
+ or terminal on the machine.
+
+
+
+
+December 19 1
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ 16) A scheduled event list, which specifies commands
+ which are to be executed at given times.
+
+ 17) A new builtin that does a subset of _\bl_\bs(1).
+
+ 18) An addition to the file expression syntax for a
+ character not in a set of characters and the ability
+ to negate a globbing pattern.
+
+ 19) New automatically initialized environment variables
+ _\bH_\bO_\bS_\bT and _\bH_\bO_\bS_\bT_\bT_\bY_\bP_\bE.
+
+ 20) Commands for debugging terminal capabilities.
+
+ 21) Searching for the visual history mechanism.
+
+ 22) New builtins for the _\bw_\bh_\bi_\bc_\bh(1) and _\bw_\bh_\be_\br_\be commands.
+
+ 23) Restarting a stopped editor with two keystrokes.
+
+ 24) Status line support
+
+ 25) Automatic execution of a command when the current
+ working directory is changed.
+
+ 26) Native Language System support.
+
+ 27) Automatic process time reporting.
+
+ 28) OS Dependent Builtin Support
+
+ 29) Automatic window size adjustment
+
+ 30) Input files
+
+ 31) Additional/Undocumented Options
+
+ 32) Enhanced history/variable modifier expansion
+
+ For a description of standard C-shell features, see the
+ _\bc_\bs_\bh manual page.
+
+
+1\b1.\b. C\bCO\bOM\bMM\bMA\bAN\bND\bD L\bLI\bIN\bNE\bE E\bED\bDI\bIT\bTI\bIN\bNG\bG
+ Commands that the user types in may be edited using the
+ same control characters that Gnu Emacs or vi uses. Arrow
+ and function key sequences are also allowed. _\bT_\bc_\bs_\bh allows
+ this by setting the terminal to `CBREAK' mode and reading
+ the input one character at a time.
+
+ There is a new shell command, _\bb_\bi_\bn_\bd_\bk_\be_\by, that allows the
+ user to redefine what any key does, or find out what any
+ or all of the keys do.
+
+
+
+
+December 19 2
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ Syntax: bindkey [ -a ] [ -c ] [ -s ] [ -v ] [ -e ] [ -d ]
+ [ -l ] [ -r ] [ -- ] [ in-string [ out-string | command ]]
+
+ If no values are given all bindings are listed. If only
+ in-string is given, bindings for the in-string is listed.
+
+ Otherwise it binds the in-string to the given out-string
+ or command. If out-string, this is treated as input to
+ _\bt_\bc_\bs_\bh when in-string is typed. This may be used recursively
+ to currently a level of 10 deep.
+
+ There are two basic key maps: the normal and alternative
+ one. The alternative is used by VI command mode. For
+ multi-character input the basic key maps contains a
+ sequence-lead-in for the first character in the input.
+
+ Options:
+ -a bind in-string in alternative key map.
+ -s bind an out-string instead of a command
+ -c bind a unix command instead of a command
+ -v bind for default VI-mode
+ -e bind for default emacs-mode
+ -d bind to compiled in default
+ -l list functions available with short description
+ -r remove the binding of in-string
+
+ In strings control characters may be written as
+ caret-<letter> and backslash ("\") is used to escape a
+ character as follows:
+ \\b\a\ba bell character
+ \\b\n\bn line feed (new line)
+ \\b\b\bb back space
+ \\b\t\bt horizontal tab
+ \\b\v\bv vertical tab
+ \\b\f\bf form feed
+ \\b\r\br carriage return
+ \\b\e\be escape
+ \\b\n\bnn\bnn\bn character code in octal
+ In all other cases \ escapes the following character.
+ Needed for escaping the special meaning of \ and ^.
+ Delete is written as "^?" (caret-question mark).
+
+ _\bT_\bc_\bs_\bh always binds the arrow keys as defined by the termcap
+ entry to:
+
+ up arrow up-history
+ down arrow down-history
+ right arrow forward-char
+ left arrow backward-char
+
+ except where these bindings would alter other single char-
+ acter bindings. If this is not desired one can avoid the
+ automatic arrow key binding using _\bs_\be_\bt_\bt_\bc to change the
+ arrow key escape sequences to the empty string. The
+
+
+
+December 19 3
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ ansi/vt100 sequences for arrow keys are always bound.
+
+ The following is a list of the default emacs and vi bind-
+ ings. Characters with the 8th bit set are written as
+ M-<character>. Note however, that unlike with the old
+ _\bb_\bi_\bn_\bd command (see below), the syntax M-<character> has no
+ special meaning to the _\bb_\bi_\bn_\bd_\bk_\be_\by command, and the bindings
+ for the sequence escape+<character> and M-<character> as
+ given below are handled separately (although the the
+ default bindings are the same). The printable ascii char-
+ acters not mentioned in the list are bound to the _\bs_\be_\bl_\bf-
+ _\bi_\bn_\bs_\be_\br_\bt-_\bc_\bo_\bm_\bm_\ba_\bn_\bd function, which just inserts the given
+ character literally into the input line. The remaining
+ characters are bound to the _\bu_\bn_\bd_\be_\bf_\bi_\bn_\be_\bd-_\bk_\be_\by function, which
+ only causes a beep (unless _\bn_\bo_\bb_\be_\be_\bp is set, of course).
+
+ EMACS bindings
+
+ "^@" -> set-mark-command
+ "^A" -> beginning-of-line
+ "^B" -> backward-char
+ "^C" -> tty-sigintr
+ "^D" -> delete-char-or-list
+ "^E" -> end-of-line
+ "^F" -> forward-char
+ "^G" -> is undefined
+ "^H" -> backward-delete-char
+ "^I" -> complete-word
+ "^J" -> newline
+ "^K" -> kill-line
+ "^L" -> clear-screen
+ "^M" -> newline
+ "^N" -> down-history
+ "^O" -> tty-flush-output
+ "^P" -> up-history
+ "^Q" -> tty-start-output
+ "^R" -> redisplay
+ "^S" -> tty-stop-output
+ "^T" -> transpose-chars
+ "^U" -> kill-whole-line
+ "^V" -> quoted-insert
+ "^W" -> kill-region
+ "^X" -> sequence-lead-in
+ "^Y" -> yank
+ "^Z" -> tty-sigtsusp
+ "^[" -> sequence-lead-in
+ "^\" -> tty-sigquit
+ "^]" -> tty-dsusp
+ " " to "/" -> self-insert-command
+ "0" to "9" -> digit
+ ":" to "~" -> self-insert-command
+ "^?" -> backward-delete-char
+
+ EMACS Multi-character and 8 bit bindings
+
+
+
+December 19 4
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ "^[^D" or "M-^D" -> list-choices
+ "^[^H" or "M-^H" -> backward-delete-word
+ "^[^I" or "M-^I" -> complete-word
+ "^[^L" or "M-^L" -> clear-screen
+ "^[^Z" or "M-^Z" -> run-fg-editor
+ "^[^[" or "M-^[" -> complete-word
+ "^[^_" or "M-^_" -> copy-prev-word
+ "^[ " or "M- " -> expand-history
+ "^[!" or "M-!" -> expand-history
+ "^[$" or "M-$" -> spell-line
+ "^[0" or "M-0" -> digit-argument
+ "^[1" or "M-1" -> digit-argument
+ "^[2" or "M-2" -> digit-argument
+ "^[3" or "M-3" -> digit-argument
+ "^[4" or "M-4" -> digit-argument
+ "^[5" or "M-5" -> digit-argument
+ "^[6" or "M-6" -> digit-argument
+ "^[7" or "M-7" -> digit-argument
+ "^[8" or "M-8" -> digit-argument
+ "^[9" or "M-9" -> digit-argument
+ "^[?" or "M-?" -> which-command
+ "^[B" or "M-B" -> backward-word
+ "^[C" or "M-C" -> capitalize-word
+ "^[D" or "M-D" -> delete-word
+ "^[F" or "M-F" -> forward-word
+ "^[H" or "M-H" -> run-help
+ "^[L" or "M-L" -> downcase-word
+ "^[N" or "M-N" -> history-search-forward
+ "^[P" or "M-P" -> history-search-backward
+ "^[R" or "M-R" -> toggle-literal-history
+ "^[S" or "M-S" -> spell-word
+ "^[U" or "M-U" -> upcase-word
+ "^[W" or "M-W" -> copy-region-as-kill
+ "^[_" or "M-_" -> insert-last-word
+ "^[b" or "M-b" -> backward-word
+ "^[c" or "M-c" -> capitalize-word
+ "^[d" or "M-d" -> delete-word
+ "^[f" or "M-f" -> forward-word
+ "^[h" or "M-h" -> run-help
+ "^[l" or "M-l" -> downcase-word
+ "^[n" or "M-n" -> history-search-forward
+ "^[p" or "M-p" -> history-search-backward
+ "^[r" or "M-r" -> toggle-literal-history
+ "^[s" or "M-s" -> spell-word
+ "^[u" or "M-u" -> upcase-word
+ "^[w" or "M-w" -> copy-region-as-kill
+ "^[^?" or "M-^?" -> backward-delete-word
+ "^X^X" -> exchange-point-and-mark
+ "^X*" -> expand-glob
+ "^X$" -> expand-variables
+ "^XG" -> list-glob
+ "^Xg" -> list-glob
+ "^Xn -> normalize-path
+ "^XN -> normalize-path
+
+
+
+December 19 5
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ VI Insert Mode functions
+
+ "^@" -> is undefined
+ "^A" -> beginning-of-line
+ "^B" -> backward-char
+ "^C" -> tty-sigintr
+ "^D" -> list-or-eof
+ "^E" -> end-of-line
+ "^F" -> forward-char
+ "^G" -> list-glob
+ "^H" -> backward-delete-char
+ "^I" -> complete-word
+ "^J" -> newline
+ "^K" -> kill-line
+ "^L" -> clear-screen
+ "^M" -> newline
+ "^N" -> down-history
+ "^O" -> tty-flush-output
+ "^P" -> up-history
+ "^Q" -> tty-start-output
+ "^R" -> redisplay
+ "^S" -> tty-stop-output
+ "^T" -> transpose-chars
+ "^U" -> backward-kill-line
+ "^V" -> quoted-insert
+ "^W" -> backward-delete-word
+ "^X" -> expand-line
+ "^Y" -> tty-dsusp
+ "^Z" -> tty-sigtsusp
+ "^[" -> vi-cmd-mode
+ "^\" -> tty-sigquit
+ " " to "~" -> self-insert-command
+ "^?" -> backward-delete-char
+
+ VI Command Mode functions
+
+ "^@" -> is undefined
+ "^A" -> beginning-of-line
+ "^B" -> is undefined
+ "^C" -> tty-sigintr
+ "^D" -> list-choices
+ "^E" -> end-of-line
+ "^F" -> is undefined
+ "^G" -> list-glob
+ "^H" -> backward-char
+ "^I" -> vi-cmd-mode-complete
+ "^J" -> newline
+ "^K" -> kill-line
+ "^L" -> clear-screen
+ "^M" -> newline
+ "^N" -> down-history
+ "^O" -> tty-flush-output
+ "^P" -> up-history
+ "^Q" -> tty-start-output
+
+
+
+December 19 6
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ "^R" -> redisplay
+ "^S" -> tty-stop-output
+ "^T" -> is undefined
+ "^U" -> backward-kill-line
+ "^V" -> is undefined
+ "^W" -> backward-delete-word
+ "^X" -> expand-line
+ "^[" -> sequence-lead-in
+ "^\" -> tty-sigquit
+ " " -> forward-char
+ "!" -> expand-history
+ "$" -> end-of-line
+ "*" -> expand-glob
+ "+" -> down-history
+ ";" -> vi-repeat-char-fwd
+ "," -> vi-repeat-char-back
+ "-" -> up-history
+ "." -> is undefined
+ "/" -> vi-search-back
+ "0" -> vi-zero
+ "1" to "9" -> digit-argument
+ "?" -> vi-search-fwd
+ "@" -> is undefined
+ "A" -> vi-add-at-eol
+ "B" -> vi-word-back
+ "C" -> change-till-end-of-line
+ "D" -> kill-line
+ "E" -> vi-endword
+ "F" -> vi-char-back
+ "I" -> vi-insert-at-bol
+ "J" -> history-search-forward
+ "K" -> history-search-backward
+ "N" -> vi-search-back
+ "O" -> sequence-lead-in
+ "R" -> vi-replace-mode
+ "S" -> vi-substitute-line
+ "T" -> vi-charto-back
+ "U" -> is undefined
+ "V" -> expand-variables
+ "W" -> vi-word-fwd
+ "X" -> backward-delete-char
+ "[" -> sequence-lead-in
+ "\^" -> beginning-of-line
+ "a" -> vi-add
+ "b" -> backward-word
+ "c" -> is undefined
+ "d" -> vi-delmeta
+ "e" -> vi-eword
+ "f" -> vi-char-fwd
+ "h" -> backward-char
+ "i" -> vi-insert
+ "j" -> down-history
+ "k" -> up-history
+ "l" -> forward-char
+
+
+
+December 19 7
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ "m" -> is undefined
+ "n" -> vi-search-fwd
+ "r" -> vi-replace-char
+ "s" -> vi-substitute-char
+ "t" -> vi-charto-fwd
+ "u" -> vi-undo
+ "v" -> expand-variables
+ "w" -> vi-beginning-of-next-word
+ "x" -> delete-char
+ "~" -> change-case
+ "^?" -> backward-delete-char
+ "M-?" -> run-help
+ "M-[" -> sequence-lead-in
+ "M-O" -> sequence-lead-in
+
+ VI Multi-character bindings
+
+ "^[?" -> run-help
+
+
+ In _\bt_\bc_\bs_\bh there are two input modes: _\bi_\bn_\bs_\be_\br_\bt and _\bo_\bv_\be_\br_\bw_\br_\bi_\bt_\be.
+ All characters that are bound to the _\bs_\be_\bl_\bf-_\bi_\bn_\bs_\be_\br_\bt-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ either get inserted or overwrite what was under the cursor
+ depending on the input mode. In emacs one can toggle
+ between modes using the _\bo_\bv_\be_\br_\bw_\br_\bi_\bt_\be-_\bm_\bo_\bd_\be function, and in VI
+ one can use any of the replace mode commands. By default
+ the mode is preserved between input lines. To specify a
+ default mode that can be enforced at the beginning of each
+ command line, the variable _\bi_\bn_\bp_\bu_\bt_\bm_\bo_\bd_\be can be set to either
+ _\bi_\bn_\bs_\be_\br_\bt or _\bo_\bv_\be_\br_\bw_\br_\bi_\bt_\be.
+
+ There is also an older version of bindkey called _\bb_\bi_\bn_\bd,
+ that allows the user to redefine what any key does, or
+ find out what any or all of the keys do. This is retained
+ for compatibility reasons.
+
+ If given two arguments _\bb_\bi_\bn_\bd binds the function (first
+ argument) to the given key (second argument). The key may
+ be: the direct character or a caret-<letter> combination,
+ which is converted to control-<letter>; M-<letter> for an
+ escaped character; or F-<string> for a function key. For
+ the last of these, the function key prefix must be bound
+ to the function "sequence-lead-in" and the string speci-
+ fied to the _\bb_\bi_\bn_\bd command must not include this prefix.
+
+ If given one argument _\bb_\bi_\bn_\bd takes the argument as the name
+ for a key and tells what that key does. As a special
+ case, the user can say
+
+ bind emacs
+ or
+ bind vi
+
+ to bind all the keys for Emacs or vi mode respectively.
+
+
+
+December 19 8
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ If given no arguments _\bb_\bi_\bn_\bd tells what all of the keys do.
+ If you give bind the single argument of 'defaults', it
+ resets each key to its default value (see the above list).
+
+
+2\b2.\b. V\bVI\bIS\bSU\bUA\bAL\bL H\bHI\bIS\bST\bTO\bOR\bRY\bY
+ The keys ^P and ^N are used to step up and down the his-
+ tory list. If the user has typed in the following:
+
+ > ls
+ foo bar
+ > echo mumble
+ mumble
+ >
+
+ then enters ^_\bP, the shell will place "echo mumble" into
+ the editing buffer, and will put the cursor at the end of
+ the line. If another ^_\bP is entered, then the editing line
+ will change to "ls". More ^_\bPs will make the bell ring,
+ since there are no more lines in the history. ^_\bN works
+ the same way, except it steps down (forward in time).
+
+ An easy way to re-do a command is to type ^_\bP followed by
+ _\bR_\be_\bt_\bu_\br_\bn. Also, pieces of previous commands can be assem-
+ bled to make a new command. The commands that work on
+ regions are especially useful for this.
+
+ ^_\bP and ^_\bN actually only copy commands from out of the his-
+ tory into the edit buffer; thus the user may step back
+ into the history and then edit things, but those changes
+ do not affect what is actually in _\bt_\bc_\bs_\bh '_\bs history.
+
+ Another way to recall (parts of) history commands is via
+ the 'expand-history' function. A variation of the 'expand-
+ history' function is called 'magic-space'. This function
+ expands _\bc_\bs_\bh history, and always appends a space. Magic-
+ space thus can be bound to <space>, to automatically
+ expand _\bc_\bs_\bh history. Expand-history is normally bound to
+ _\bM-<_\bs_\bp_\ba_\bc_\be> and magic-space is not bound.
+
+
+3\b3.\b. T\bTT\bTY\bY M\bMO\bOD\bDE\bE S\bSA\bAN\bNI\bIT\bTY\bY
+ As part of the editor, _\bt_\bc_\bs_\bh does a check and reset of the
+ terminal mode bits. If the speed has been changed, then
+ _\bt_\bc_\bs_\bh will change to using that speed. _\bT_\bc_\bs_\bh will also obey
+ changes in the padding needed by the tty. Also, the shell
+ will automatically turn off RAW and CBREAK (on systems
+ that use _\bt_\be_\br_\bm_\bi_\bo(_\b7) it will turn on ICANON) modes, and will
+ turn on the tty driver's output processing (OPOST).
+
+ The list of the tty modes that are always set or cleared
+ by _\bt_\bc_\bs_\bh can be examined and modified using the _\bs_\be_\bt_\bt_\by
+ builtin. The _\bs_\be_\bt_\bt_\by display is similar to _\bs_\bt_\bt_\by(_\b1), and
+ varies depending on the system's tty driver. Modes that
+
+
+
+December 19 9
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ _\bt_\bc_\bs_\bh will always try to set are shown as +_\bm_\bo_\bd_\be . Modes
+ that _\bt_\bc_\bs_\bh will always try to clear are shown as -_\bm_\bo_\bd_\be and
+ modes that tcsh will track and allow to be modified are
+ not shown by default, or if the -_\ba flag is given, are
+ shown without a leading sign. For tty characters, -_\bc_\bh_\ba_\br
+ disables the tty character, while +_\bc_\bh_\ba_\br protects the tty
+ character from being changed.
+
+ Setty can be used to control the three different modes
+ _\bt_\bc_\bs_\bh uses for the tty. The default mode displayed is the
+ "execute" mode which is used when tcsh executes commands.
+ The two other modes are the "edit" mode and the "quote"
+ mode. The "edit" mode is used for command line editing,
+ and the "quote" mode is used when entering literal charac-
+ ters. The "execute" mode can be specified with -_\bx , the
+ "edit" mode with -_\bd , and the "quote" mode with -_\bq For
+ example if one wants to set the _\be_\bc_\bh_\bo_\bk flag and let the
+ _\be_\bc_\bh_\bo_\be pass unchanged:
+
+ > setty
+ iflag:-inlcr -igncr +icrnl
+ oflag:+opost +onlcr -onlret
+ cflag:
+ lflag:+isig +icanon +echo +echoe -echok -echonl -noflsh
+ +echoctl -flusho +iexten
+ chars:
+ > setty +echok echoe
+ > setty
+ iflag:-inlcr -igncr +icrnl
+ oflag:+opost +onlcr -onlret
+ cflag:
+ lflag:+isig +icanon +echo +echok -echonl -noflsh +echoctl
+ -flusho +iexten
+ chars:
+
+
+
+4\b4.\b. W\bWO\bOR\bRD\bD C\bCO\bOM\bMP\bPL\bLE\bET\bTI\bIO\bON\bN
+ In typing commands, it is no longer necessary to type a
+ complete name, only a unique abbreviation is necessary.
+ When you type a TAB to _\bt_\bc_\bs_\bh it will complete the name for
+ you, echoing the full name on the terminal (and entering
+ it into the edit buffer). If the prefix you typed matches
+ no name, the terminal bell is rung, unless the variable
+ _\bn_\bo_\bb_\be_\be_\bp is set. The name may be partially completed if the
+ prefix matches several longer names. If this is the case,
+ the name is extended up to the point of ambiguity, and the
+ bell is rung. This works for file names, command names,
+ shell variables and the ~ user name convention. The vari-
+ able _\bf_\bi_\bg_\bn_\bo_\br_\be may be set to a list of suffixes to be disre-
+ garded during completion.
+
+ _\bE_\bx_\ba_\bm_\bp_\bl_\be
+
+
+
+
+December 19 10
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ Assume the current directory contained the files:
+
+ DSC.TXT bin cmd lib memos
+ DSC.NEW chaos cmtest mail netnews
+ bench class dev mbox new
+
+ The command:
+
+ > gnumacs ch[TAB]
+
+ would cause _\bt_\bc_\bs_\bh to complete the command with the file
+ name chaos. If instead, the user had typed:
+
+ > gnumacs D[TAB]
+
+ _\bt_\bc_\bs_\bh would have extended the name to DSC and rung the ter-
+ minal bell, indicating partial completion. However, if
+ _\bf_\bi_\bg_\bn_\bo_\br_\be had previously been set to a list containing .NEW
+ as one element, e.g. ( .o .NEW ), _\bt_\bc_\bs_\bh would have com-
+ pleted the `D' to DSC.TXT.
+
+ File name completion works equally well when other direc-
+ tories are addressed. Additionally, _\bt_\bc_\bs_\bh understands the
+ C shell tilde (~) convention for home directories. In
+ addition it caches tilde name references for fast access.
+ This cache can be flushed by using the builtin _\br_\be_\bh_\ba_\bs_\bh.
+ Thus,
+
+ > cd ~speech/data/fr[TAB]
+
+ does what one might expect. This may also be used to
+ expand login names only. Thus,
+
+ > cd ~sy[TAB]
+
+ expands to
+
+ > cd ~synthesis
+
+
+ Command names may also be completed, for example,
+
+ > gnum[TAB]
+
+ will expand to "gnumacs" (assuming that there are no other
+ commands that begin with "gnum").
+
+ Shell and environment variables are recognized also and in
+ addition they can be expanded:
+
+ > set local=/usr/local
+ > echo $lo[TAB]
+
+ will expand to "$local/". Note that a slash is appended
+
+
+
+December 19 11
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ because the expanded variable points to a directory. Also:
+
+ > set local=/usr/local
+ > echo $local/[^D]
+ bin/ etc/ lib/ man/ src/
+
+ will correctly list the contents of /usr/local. Shell and
+ environment variables can also be expanded via the expand-
+ variables function:
+
+ > echo $local/[^X$]
+ > echo /usr/local/
+
+
+ Completion also works when the cursor is in the middle of
+ the line, rather than just the end. All of the text after
+ the cursor will be saved, the completion will work (possi-
+ bly adding to the current name), and then the saved text
+ will be restored in place, after the cursor.
+
+ The behavior of the completion can be changed by the set-
+ ting of several shell variables:
+
+ Setting the _\br_\be_\bc_\be_\bx_\ba_\bc_\bt variable makes an exact command be
+ expanded rather than just ringing the bell. For example,
+ assume the current directory has two subdirectories called
+ foo and food, then with _\br_\be_\bc_\be_\bx_\ba_\bc_\bt set the following could
+ be done:
+
+ > cd fo[TAB]
+ to ...
+ > cd foo[TAB]
+ to ...
+ > cd foo/
+
+ rather than beeping on the second TAB.
+
+ If the _\ba_\bu_\bt_\bo_\bl_\bi_\bs_\bt variable is set, invoking completion when
+ several choices are possible will automatically list the
+ choices, effectively merging the functionality described
+ in the next section into the completion mechanism. If
+ _\ba_\bu_\bt_\bo_\bl_\bi_\bs_\bt is set to "ambiguous", then _\bt_\bc_\bs_\bh will only list
+ the choices if there were no new characters added in the
+ completion operation.
+
+
+ The "noise level" can be controlled by the value that
+ _\bm_\ba_\bt_\bc_\bh_\bb_\be_\be_\bp is set to: With matchbeep=nomatch, completion
+ will only beep if there are no matching names; with match-
+ beep=ambiguous, completion will _\ba_\bl_\bs_\bo beep if there are
+ many possible matches; with matchbeep=notunique, comple-
+ tion will _\ba_\bl_\bs_\bo beep when there is an exact match but there
+ are other, longer, matches (see recexact). With match-
+ beep=never or set to any other value completion will never
+
+
+
+December 19 12
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ beep. If matchbeep is not set it defaults to ambiguous.
+
+ If the _\ba_\bu_\bt_\bo_\be_\bx_\bp_\ba_\bn_\bd variable is set, the expand-history
+ function will be invoked automatically before the comple-
+ tion attempt, expanding normal _\bc_\bs_\bh history substitutions.
+
+ For covert operation, the variable _\bn_\bo_\bb_\be_\be_\bp can be set; it
+ will prevent the completion mechanism, as well as _\bt_\bc_\bs_\bh in
+ general, from actually beeping. Finally, if the _\ba_\bu_\bt_\bo_\bc_\bo_\br-
+ _\br_\be_\bc_\bt variable is set, the spelling correction is attempted
+ for any path components up to the completion point.
+
+
+5\b5.\b. L\bLI\bIS\bST\bTI\bIN\bNG\bG O\bOF\bF P\bPO\bOS\bSS\bSI\bIB\bBL\bLE\bE N\bNA\bAM\bME\bES\bS
+ At any point in typing a command, you may request "what
+ names are available". Thus, when you have typed, perhaps:
+
+ > cd ~speech/data/fritz/
+
+ you may wish to know what files or subdirectories exist
+ (in ~speech/data/fritz), without, of course, aborting the
+ command you are typing. Typing the character Control-D
+ (^D), will list the names (files, in this case) available.
+ The files are listed in multicolumn format, sorted column-
+ wise. Directories are indicated with a trailing `/', exe-
+ cutable files with a `*', symbolic links with a '@', sock-
+ ets with a '=', FIFOs (named pipes) with a '|', character
+ devices with a '%', and block devices with a '#'. Once
+ printed, the command is re-echoed for you to complete.
+
+ Additionally, one may want to know which files match a
+ prefix. If the user had typed:
+
+ > cd ~speech/data/fr[^D]
+
+ all files and subdirectories whose prefix was ``fr'' 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
+ directory for both file name completion and listing.
+
+ The degenerate
+
+ > ~[^D]
+
+ will print a full list of login names on the current sys-
+ tem. Note, however, that the degenerate
+
+ > <Spaces>[^D]
+
+ does not list all of the commands, but only beeps.
+
+ Listing/expanding of words that match a name containing
+
+
+
+December 19 13
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ wildcard characters can be done via the list-glob/expand-
+ glob function:
+ > ls
+ foo.c bar.c a.out
+ > vi *.c[^Xg]
+ foo.c bar.c
+ > vi *.c[^X*]
+ > vi foo.c bar.c
+
+
+C\bCo\bom\bmm\bma\ban\bnd\bd N\bNa\bam\bme\be R\bRe\bec\bco\bog\bgn\bni\bit\bti\bio\bon\bn
+ Command name recognition and completion works in the same
+ manner as file name recognition and completion above. The
+ current value of the environment variable _\bP_\bA_\bT_\bH is used in
+ searching for the command. For example
+
+ > newa[TAB]
+
+ might expand to
+
+ > newaliases
+
+ Also,
+
+ > new[^D]
+
+ would list all commands (along PATH) that begin with
+ "new".
+
+ Note that Control-D has three different effects on _\bt_\bc_\bs_\bh.
+ On an empty line (one that contains nothing, not even
+ spaces), ^_\bD sends an EOF to _\bt_\bc_\bs_\bh just as it does for nor-
+ mal programs. When the cursor is in the middle of a line
+ of text, ^_\bD deletes the character that the cursor is
+ under. Finally, a ^_\bD at the end of a line of text lists
+ the available names at that point. To get a list of
+ available names when the cursor is in the middle of a line
+ (or on an empty line), a Meta-Control-D should be typed
+ (Escape followed by Control-D).
+
+
+6\b6.\b. S\bSP\bPE\bEL\bLL\bLI\bIN\bNG\bG C\bCO\bOR\bRR\bRE\bEC\bCT\bTI\bIO\bON\bN
+ If while typing a command, the user mistypes or misspells
+ a file name, user name, or command name, _\bt_\bc_\bs_\bh can correct
+ the spelling. When correcting a file name, each part of
+ the path is individually checked and corrected. Spelling
+ correction can be invoked in several different ways:
+
+ The _\bs_\bp_\be_\bl_\bl-_\bw_\bo_\br_\bd function, normally bound to M-s (and M-S),
+ will attempt to correct the word immediately before the
+ cursor. For example, suppose that the user has typed:
+
+ > cd /uxr/spol/news[ESC s]
+
+
+
+
+December 19 14
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ _\bT_\bc_\bs_\bh will check the path for spelling, correct the mis-
+ takes, and redraw the line as
+
+ > cd /usr/spool/news
+
+ leaving the cursor at the end of the line.
+
+ Spelling correction of the entire command line (indepen-
+ dent of where the cursor is) can be done with the _\bs_\bp_\be_\bl_\bl-
+ _\bl_\bi_\bn_\be function, normally bound to M-$ (Escape Dollar-sign).
+ It will check each word independently, but in order to
+ avoid e.g. command options, no correction is attempted on
+ words whose first character is found in the string
+ "!.\^-*%".
+
+ Finally, automatic spelling correction will be done each
+ time the Return key is hit, if the _\bc_\bo_\br_\br_\be_\bc_\bt variable is set
+ to an appropriate value: correct=cmd will cause the
+ spelling of the command name only to be checked, while
+ correct=all causes checking of all words on the line, like
+ the spell-line function. If any part of the command line
+ is corrected, the user will be given a special prompt as
+ defined by the _\bp_\br_\bo_\bm_\bp_\bt_\b3 variable, followed by the corrected
+ line, e.g.
+
+ > lz /usr/bin
+ CORRECT>ls /usr/bin (y|n|e)?
+
+ Answering 'y' or <space> at the prompt will cause the cor-
+ rected line to be executed, 'e' will leave the uncorrected
+ command in the input buffer and anything else will execute
+ the original line unchanged.
+
+ Automatic correction is not guaranteed to work the way the
+ user intended. Command line parsing is done in a rudimen-
+ tary fashion. It is mostly provided as an experimental
+ feature. Suggestions and improvements are welcome.
+
+
+7\b7.\b. D\bDO\bOC\bCU\bUM\bME\bEN\bNT\bTA\bAT\bTI\bIO\bON\bN L\bLO\bOO\bOK\bKU\bUP\bP
+ The editor function _\br_\bu_\bn-_\bh_\be_\bl_\bp (M-h) prints a help file on
+ the current command (using the same definition of current
+ as the completion routines use). This help file is found
+ by searching the path list HPATH for files of the form
+ foo.help, foo.1, foo.8, or foo.6 in that order (assuming
+ that the current command is foo). The file is just
+ printed, not paged in any way. This is because _\br_\bu_\bn-_\bh_\be_\bl_\bp
+ is meant to be used to look up short help files, not man-
+ ual pages (although it can do manual pages also).
+
+
+8\b8.\b. E\bEN\bNH\bHA\bAN\bNC\bCE\bED\bD H\bHI\bIS\bST\bTO\bOR\bRY\bY M\bME\bEC\bCH\bHA\bAN\bNI\bIS\bSM\bM
+ _\bT_\bc_\bs_\bh will save the history list between login sessions.
+ It does this by writing the current list to the file
+
+
+
+December 19 15
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ "~/.history" on logout, and reading it in on login. For
+ example, placing the line
+
+ > set history=25 savehist=20
+
+ tells _\bt_\bc_\bs_\bh to save the last 25 commands on the history
+ list, and to save the last 20 of them between logins. The
+ "savehist" variable may be set up to the size of history,
+ although it is an error to have _\bs_\ba_\bv_\be_\bh_\bi_\bs_\bt larger than _\bh_\bi_\bs-
+ _\bt_\bo_\br_\by. In addition to the above _\bt_\bc_\bs_\bh, keeps unparsed (lit-
+ eral) versions of the history if the variable _\bh_\bi_\bs_\bt_\bl_\bi_\bt is
+ set. Also the toggle-history function toggles between the
+ parsed and literal version of the recalled history in the
+ editor buffer. For example:
+
+ > set histlit
+ > echo !:s/foo/bar; ls
+ Modifier failed.
+ > ^P
+ > echo !:s/foo/bar; ls
+ > unset histlit
+ > echo !:s/foo/bar; ls
+ Modifier failed.
+ > ^P
+ > echo unset histlit[M-r]
+ > echo !:s/foo/bar; ls
+
+ _\bT_\bc_\bs_\bh also supports the history escape !#. This undocu-
+ mented _\bc_\bs_\bh escape holds the words of the current line.
+ This is useful in renaming commands:
+
+ > mv foo bar!#:1
+ mv foo barfoo
+
+ Care should be taken when using this history expansion in
+ _\bc_\bs_\bh since there is no check for recursion. In _\bt_\bc_\bs_\bh up to
+ 10 levels of recursion are allowed.
+
+ Another difference between _\bt_\bc_\bs_\bh and _\bc_\bs_\bh history expansion,
+ is the treatment of history arguments. In _\bc_\bs_\bh !_\b3_\bd expands
+ to event 3 with the letter "d" appended to it. There is
+ no way to repeat a command that begins with a number using
+ the name of the command in the history escape. In _\bt_\bc_\bs_\bh
+ only numeric arguments are treated as event numbers;
+ therefore !_\b3_\bd is interpreted as: repeat the last command
+ that started with the string "3d". To mimic the _\bc_\bs_\bh behav-
+ ior !_\b3\_\bd can be used.
+
+
+
+9\b9.\b. A\bAU\bUT\bTO\bOM\bMA\bAT\bTI\bIC\bC L\bLO\bOG\bGO\bOU\bUT\bT/\b/L\bLO\bOC\bCK\bKI\bIN\bNG\bG
+ The automatic locking and logout time are controlled by
+ the variable _\ba_\bu_\bt_\bo_\bl_\bo_\bg_\bo_\bu_\bt. The value of the first word is
+ the number of minutes of inactivity will be allowed before
+
+
+
+December 19 16
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ automatically logging the user out. When that many min-
+ utes have been reached, the shell prints "auto-logout" and
+ dies (without executing ~/.logout). The default for _\bt_\bc_\bs_\bh
+ is to set _\ba_\bu_\bt_\bo_\bl_\bo_\bg_\bo_\bu_\bt for 60 minutes on login shells, and
+ when the user is root. To disable autologout (for
+ instance in a window system), unset the shell variable
+ _\ba_\bu_\bt_\bo_\bl_\bo_\bg_\bo_\bu_\bt.
+
+ The value of the optional second word indicates the number
+ of minutes of inactivity after which the user will be
+ prompted for his login password to continue working. Fail-
+ ure to enter the correct password 5 times, results in
+ auto-logout.
+
+
+1\b10\b0.\b. E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN O\bOF\bF A\bA C\bCO\bOM\bMM\bMA\bAN\bND\bD P\bPR\bRI\bIO\bOR\bR T\bTO\bO E\bEA\bAC\bCH\bH P\bPR\bRO\bOM\bMP\bPT\bT
+ _\bT_\bc_\bs_\bh supports a special alias, _\bp_\br_\be_\bc_\bm_\bd, which if set holds
+ a command that will be executed before printing each
+ prompt. For example, if the user has done
+
+ > alias precmd date
+
+ then the program _\bd_\ba_\bt_\be will be run just before the shell
+ prompts for each command. There are no limitations on
+ what precmd can be set to do, although discretion should
+ be used.
+
+
+1\b11\b1.\b. P\bPE\bER\bRI\bIO\bOD\bDI\bIC\bC C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN
+ _\bT_\bc_\bs_\bh is now capable of providing periodic command execu-
+ tion through the use of the shell variable _\bt_\bp_\be_\br_\bi_\bo_\bd and the
+ alias _\bp_\be_\br_\bi_\bo_\bd_\bi_\bc. When these items are set, the alias _\bp_\be_\br_\bi-
+ _\bo_\bd_\bi_\bc will be executed every _\bt_\bp_\be_\br_\bi_\bo_\bd minutes. This pro-
+ vides a convenient means for checking on common but infre-
+ quent changes, such as new messages. Example:
+
+ > set tperiod = 30
+ > alias periodic checknews
+
+ This will cause the _\bc_\bh_\be_\bc_\bk_\bn_\be_\bw_\bs(1) program to be run every
+ 30 minutes. Having the alias _\bp_\be_\br_\bi_\bo_\bd_\bi_\bc set but with an
+ unset _\bt_\bp_\be_\br_\bi_\bo_\bd (or a value of 0 for _\bt_\bp_\be_\br_\bi_\bo_\bd) will cause
+ _\bp_\be_\br_\bi_\bo_\bd_\bi_\bc to degenerate to another form of _\bp_\br_\be_\bc_\bm_\bd.
+
+
+1\b12\b2.\b. N\bNE\bEW\bW P\bPR\bRO\bOM\bMP\bPT\bT F\bFO\bOR\bRM\bMA\bAT\bT
+ The format for the _\bp_\br_\bo_\bm_\bp_\bt shell variable has been changed
+ to include many new things, such as the current time of
+ day, current working directory, etc.. The new format uses
+ "%<char>" to signal an expansion, much like _\bp_\br_\bi_\bn_\bt_\bf(_\b3_\bS).
+ The available sequences are:
+
+ %/ Current working directory.
+ %~ cwd. If it starts with $HOME, that part is
+
+
+
+December 19 17
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ replaced by a ~. In addition if a directory
+ name prefix matches a user's home directory,
+ that part of the directory will be substituted
+ with ~user. NOTE: The ~user substitution will
+ only happen if the shell has performed a ~
+ expansion for that user name in this session.
+ %c or %. Trailing component of cwd, may be
+ followed by by a digit to get more than one
+ component, if it starts with $HOME, that
+ part is replaced with a ~.
+ %C Trailing component of cwd, may be followed
+ by a digit to get more than one component, no
+ ~ substitution.
+ %h, %!, ! Current history event number.
+ %M The full machine hostname.
+ %m The hostname up to the first ".".
+ %S (%s) Start (stop) standout mode.
+ %B (%b) Start (stop) boldfacing mode. (Only if
+ tcsh was compiled to be eight bit clean.)
+ %U (%u) Start (stop) underline mode. (Only if
+ tcsh was compiled to be eight bit clean.)
+ %t or %@ Current time of day, in 12-hour, am/pm format.
+ %T Current time of day, in 24-hour format.
+ (But see the _\ba_\bm_\bp_\bm shell variable below.)
+ \c `c' is parsed the same way as in bindkey.
+ ^c `c' is parsed the same way as in bindkey.
+ %% A single %.
+ %n The user name, contents of $user.
+ %d The weekday in <Day> format.
+ %D The day in dd format.
+ %w The month in <Mon> format.
+ %W The month in mm format.
+ %y The year in yy format.
+ %Y The year in yyyy format.
+ %l The line (tty) the user is logged on.
+ %L clear from prompt to end of display or end of line.
+ %# A `#' if tcsh is run as a root shell,
+ a `>' if not.
+ %{..%} Include string as a literal escape sequence.
+ Note that the enclosed escape sequence, should
+ only be used to change terminal attributes and
+ should not move the cursor location. Also, this
+ cannot be the last character in the prompt
+ string. (Available only if tcsh was compiled to
+ be eight bit clean.)
+ %? return code of the last command executed just
+ before the prompt.
+ %R In prompt3 this is the corrected string; in
+ prompt2 it is the status of the parser.
+
+ The sequences for standout are often used to indicate that
+ this is an enabled (running as root) shell. An example:
+
+ > set prompt="%m [%h] %U[%@]%u [%/] you rang? "
+
+
+
+December 19 18
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ tut [37] [_\b2:_\b5_\b4_\bp_\bm] [/usr/accts/sys] you rang? _
+
+ In addition, there is a new variable, _\bp_\br_\bo_\bm_\bp_\bt_\b2, which is
+ used to prompt for the body of while and for loops (wher-
+ ever normal _\bc_\bs_\bh prompts with a question mark). The
+ default for _\bp_\br_\bo_\bm_\bp_\bt_\b2 is "%R? ": the status of the parser
+ followed by a question mark. This alternate prompt is
+ also used when the parser is waiting for more input; i.e.
+ when the previous line ended in a \. The _\bp_\br_\bo_\bm_\bp_\bt_\b3 variable
+ is used when displaying the corrected command line when
+ automatic spelling correction is in effect; it defaults to
+ "CORRECT>%R (y|n|e)? ".
+
+
+
+1\b13\b3.\b. T\bTI\bIM\bME\bE-\b-S\bST\bTA\bAM\bMP\bPE\bED\bD H\bHI\bIS\bST\bTO\bOR\bRY\bY L\bLI\bIS\bST\bT
+ The history list in _\bt_\bc_\bs_\bh now has a time-of-day stamp
+ attached to each history list event. This time stamp is
+ printed whenever the history command is executed. This
+ allows the user to keep track of when the various events
+ occurred. The time stamps are not maintained on the saved
+ history list (also available in _\bc_\bs_\bh); thus, on logging
+ back in, all the saved history events will be recorded
+ with the login time as their time stamp. The time stamp
+ printouts can be omitted from the history list by adding
+ the -t switch to the _\bh_\bi_\bs_\bt_\bo_\br_\by command.
+
+
+1\b14\b4.\b. D\bDI\bIR\bRE\bEC\bCT\bTO\bOR\bRY\bY A\bAC\bCC\bCE\bES\bSS\bS
+ _\bT_\bc_\bs_\bh supports three new flags to control directory style
+ printing for cd, pushd, popd, and dirs:
+
+ -_\bn Print entries in new lines so that the screen width is
+ not exceeded
+
+ -_\bl Don't print ~ but print the whole path
+
+ -_\bv Print the stack entries one in each line, preceded by
+ the stack number.
+
+ Note that popd +n can be used to pop out stack entries of
+ directories that do not exist any more.
+
+ _\bT_\bc_\bs_\bh will now allow the user to access all elements in the
+ directory stack directly. The syntax "=<digit>" is recog-
+ nized by _\bt_\bc_\bs_\bh as indicating a particular directory in the
+ stack. (This works for the file/command name recognition
+ as well.) This syntax is analogous to the ~ syntax for
+ access to users' home directories. The stack is viewed as
+ zero-based, i.e., =0 is the same as $cwd, which is the
+ same as ".". As a special case, the string "=-" is recog-
+ nized as indicating the last directory in the stack.
+ Thus,
+
+
+
+
+December 19 19
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ > dirs -v
+ 0 /usr/net/bin
+ 1 /usr/spool/uucp
+ 2 /usr/accts/sys
+ > echo =2
+ /usr/accts/sys
+ > ls -l =1/LOGFILE
+ -rw-r--r-- 1 uucp 2594 Jan 19 09:09 /usr/spool/uucp/LOGFILE
+ > echo =-/.cs*
+ /usr/accts/sys/.cshrc
+ > echo =4
+ Not that many dir stack entries.
+ >
+
+ _\bT_\bc_\bs_\bh will complain if you ask for a directory stack item
+ which does not exist.
+
+ In the normal _\bc_\bs_\bh, saying "pushd +2" would rotate the
+ entire stack around through 2 stack elements, placing the
+ entry found there at the top of the stack. If, however,
+ the new shell variable _\bd_\be_\bx_\bt_\br_\ba_\bc_\bt is set, then issuing
+ "pushd +n" will cause the nth directory stack element to
+ be extracted from its current position, which will then be
+ pushed onto the top of the stack. Example:
+
+ > dirs
+ ~ /usr/spool/uucp /usr/net/bin /sys/src
+ > set dextract
+ > pushd +2
+ /usr/net/bin ~ /usr/spool/uucp /sys/src
+ > unset dextract
+ > pushd +2
+ /usr/spool/uucp /sys/src /usr/net/bin ~
+
+ The way symbolic links that point to directories are
+ crossed is determined by two variables: _\bc_\bh_\ba_\bs_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs and
+ _\bi_\bg_\bn_\bo_\br_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs. If _\bc_\bh_\ba_\bs_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs is set, then every
+ time the directory changes, $_\bc_\bw_\bd reflects the real direc-
+ tory name, and not the name through the link. A notable
+ exception is the user's home directory, but that should be
+ fixed. If _\bi_\bg_\bn_\bo_\br_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs is set, then directory change
+ tries to find where you came from before you crossed the
+ link to change the directory relatively. If you chdir
+ through a symbolic link and then cd .., you will end ..
+ relatively to where you were before you crossed the link
+ and not .. relatively to where the symbolic link points.
+
+ For example:
+
+ > cd /tmp
+ > mkdir from from/src to
+ > ln -s ../from/src to/dst
+ > echo $cwd
+ /tmp
+
+
+
+December 19 20
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ > unset ignore_symlinks; unset chase_symlinks
+ > cd to/dst; echo $cwd
+ /tmp/to/dst
+ > cd ..
+ /tmp/from
+
+ > unset ignore_symlinks; set chase_symlinks
+ > cd /tmp/to/dst; echo $cwd
+ /tmp/from/src
+ > cd ..; echo $cwd
+ /tmp/from
+
+ > set ignore_symlinks; unset chase_symlinks
+ > cd /tmp/to/dst; echo $cwd
+ /tmp/to/dst
+ > cd ..; echo $pwd
+ /tmp/to
+
+ In case you are wondering what happens when you set both,
+ _\bi_\bg_\bn_\bo_\br_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs will override _\bc_\bh_\ba_\bs_\be__\bs_\by_\bm_\bl_\bi_\bn_\bk_\bs.
+
+
+1\b15\b5.\b. W\bWA\bAT\bTC\bCH\bHI\bIN\bNG\bG F\bFO\bOR\bR L\bLO\bOG\bGI\bIN\bNS\bS A\bAN\bND\bD L\bLO\bOG\bGO\bOU\bUT\bTS\bS
+ _\bT_\bc_\bs_\bh has a mechanism so that the user can watch for login
+ and logout activity of any user or terminal in the system.
+ This is accomplished using the new special shell variable
+ _\bw_\ba_\bt_\bc_\bh, which contains login/terminal pattern pairs to be
+ checked for activity. For example:
+
+ > set watch=(sys ttyjd root console)
+
+ This setting will allow the user to check on when the user
+ "sys" logs in on /dev/ttyjd. Similarly, it will inform
+ the user of root's activity on the console. In order to
+ be more general, the word "any" may be substituted for
+ either a user's or a terminal's name, thus allowing
+
+ > set watch=('b*' any any ttyh0)
+
+ which will check for users that match the pattern 'b*'
+ logging in or out of the system on any terminal, as well
+ as anyone logging in to /dev/ttyh0. Naturally, the com-
+ pletely general case
+
+ > set watch=(any any)
+
+ allows the user to check on any and all login/logout
+ activity in the the system.
+
+ By default, the interval between checks of users on the
+ system is 10 minutes; this can be changed by making the
+ first element of _\bw_\ba_\bt_\bc_\bh a number of minutes which should be
+ used instead, as in
+
+
+
+
+December 19 21
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ > set watch=(40 any any)
+
+ which will check for any users logging in or out every 40
+ minutes.
+
+ There is also a new command, _\bl_\bo_\bg, which is used to cause
+ _\bt_\bc_\bs_\bh to inform the user of all users/terminals affected by
+ _\bw_\ba_\bt_\bc_\bh whether they have been announced before or not.
+ This is useful if a user has been on for some time and
+ cannot remember if a particular person/terminal is online
+ right now or not. _\bL_\bo_\bg will reset all indication of previ-
+ ous announcement and give the user the login list all over
+ again, as well as printing the current value of _\bw_\ba_\bt_\bc_\bh.
+
+ The first time that _\bw_\ba_\bt_\bc_\bh is set at _\bt_\bc_\bs_\bh startup, all
+ affected users and terminals will be printed as though
+ those users/terminals had just logged on. This may appear
+ to be a bug, but is generally considered a feature, since
+ it allows the user to see who is on when he first logs in.
+
+ The format of the printouts can be tailored via setting of
+ the variable _\bw_\bh_\bo. The following sequences are available
+ for the format specification:
+
+ %n The name of the user that logged in/out.
+ %a The observed action, i.e. "logged on",
+ "logged off", or "replaced <olduser> on".
+ %l The line (tty) the user is logged on.
+ %S (%s) Start (stop) standout mode.
+ %B (%b) Start (stop) boldfacing mode. (Only if
+ tcsh was compiled to be eight bit clean)
+ %U (%u) Start (stop) underline mode. (Only if
+ tcsh was compiled to be eight bit clean)
+ %M The full hostname of the remote host ("local"
+ if non-remote).
+ %m The hostname up to the first ".". If only
+ the ip address is available or the utmp
+ field contains the name of an x-windows
+ display, the whole name is printed.
+ %t or %@ The time, in 12-hour, am/pm format (logout
+ time is approximated if unavailable).
+ %T The time, in 24-hour format. (but see
+ the "ampm" shell variable below).
+ %D The day in dd format.
+ %w The month in <Mon> format.
+ %W The month in mm format.
+ %Y The year in yy format.
+
+ The %M and %m sequences are only available on systems that
+ store the remote hostname in /etc/utmp. If _\bw_\bh_\bo is not set,
+ the format defaults to "%n has %a %l from %m.", or "%n has
+ %a %l." on systems that don't store the hostname.
+
+
+
+
+
+December 19 22
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+1\b16\b6.\b. T\bTI\bIM\bME\bED\bD E\bEV\bVE\bEN\bNT\bT L\bLI\bIS\bST\bT
+ _\bT_\bc_\bs_\bh now supports a scheduled-event list through the use
+ of the command _\bs_\bc_\bh_\be_\bd. This command gives the user a mech-
+ anism by which to arrange for other commands to be exe-
+ cuted at given times. An event is added to the scheduled-
+ event list by saying
+
+ > sched [+]hh:mm <command>
+
+ as in
+
+ > sched 11:00 echo It\'s eleven o\'clock.
+
+ This will make an entry in the list at 11am for the echo
+ command to be run with the given arguments. The time may
+ be specified in either absolute or relative time, and
+ absolute times may have a morning/afternoon specification
+ as well, using "am" or "pm." For example,
+
+ > sched +2:15 /usr/lib/uucp/uucico -r1 -sother
+ > sched 5pm set prompt='[%h] It\'s after 5; go home: >'
+ > sched +3am echo This syntax doesn\'t work.
+ Relative time inconsistent with am/pm.
+ >
+
+ Note that _\bt_\bc_\bs_\bh will complain if you try to make faulty
+ time specifications.
+
+ Printing the current time-event list is accomplished by
+ giving the _\bs_\bc_\bh_\be_\bd command with no arguments:
+
+ > sched
+ 1 Wed Apr 4 15:42 /usr/lib/uucp/uucico -r1 -sother
+ 2 Wed Apr 4 17:00 set prompt=[%h] It's after 5; go home: >
+ >
+
+ There is also a mechanism by which the user can remove an
+ item from the list:
+
+ > sched --3
+ Usage for delete: sched -<item#>.
+ > sched -3
+ Not that many scheduled events.
+ > sched -2
+ > sched
+ 1 Wed Apr 4 15:42 /usr/lib/uucp/uucico -r1 -sother
+ >
+
+ All commands specified on the scheduled-event list will be
+ executed just prior to printing the first prompt immedi-
+ ately following the time when the command is to be run.
+ Hence, it is possible to miss the exact time when the com-
+ mand is to be run, but _\bt_\bc_\bs_\bh will definitely get around to
+ all commands which are overdue at its next prompt.
+
+
+
+December 19 23
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ Scheduled-event list items which come due while _\bt_\bc_\bs_\bh is
+ waiting for user input will be executed immediately. In
+ no case, however, will normal operation of already-running
+ commands be interrupted so that a scheduled-event list
+ element may be run.
+
+ This mechanism is similar to, but not the same as, the
+ _\ba_\bt(1) command on some Unix systems. Its major disadvan-
+ tage is that it does not necessarily run a command at
+ exactly the specified time (but only if another command is
+ already being run). Its major advantage is that commands
+ which run directly from _\bt_\bc_\bs_\bh, as sched commands are, have
+ access to shell variables and other structures. This pro-
+ vides a mechanism for changing one's working environment
+ based on the time of day.
+
+
+1\b17\b7.\b. B\bBU\bUI\bIL\bLT\bTI\bIN\bN F\bFO\bOR\bR l\bls\bs -\b-F\bF
+ There is a new builtin command called _\bl_\bs-_\bF which does the
+ same thing as the command "ls -aF" if the shell variable
+ _\bs_\bh_\bo_\bw_\bd_\bo_\bt_\bs has been set, and acts like "ls -F" otherwise.
+ Ls-F works like ls, only it is generally faster. If other
+ switches are passed to _\bl_\bs-_\bF, then the normal ls is exe-
+ cuted. Aliasing ls to ls-F provides a fast alternative way
+ of listing files. Note that on non BSD machines, where ls
+ -C is not the default, _\bl_\bs-_\bF, behaves like ls -CF.
+
+ _\bl_\bs-_\bF appends the following characters depending on the
+ file type:
+
+ = File is an AF_UNIX domain socket.
+ [if system supports sockets]
+ | File is a named pipe (fifo)
+ [if system supports named pipes]
+ % File is a character device
+ # File is a block device
+ / File is a directory
+ * File is executable
+ + File is a hidden directory [aix]
+ or context dependent [hpux]
+ : File is network special [hpux]
+
+ On systems that support symbolic links the variable
+ _\bl_\bi_\bs_\bt_\bl_\bi_\bn_\bk_\bs controls the way symbolic links are identified.
+ If _\bl_\bi_\bs_\bt_\bl_\bi_\bn_\bk_\bs is not set then the character '@' is appended
+ to the file. If _\bl_\bi_\bs_\bt_\bl_\bi_\bn_\bk_\bs is set then the following char-
+ acters are appended to the filename depending on the type
+ of file the symbolic links points to:
+
+ @ File is a symbolic link pointing
+ to a non-directory
+ > File is a symbolic link pointing
+ to a directory
+ & File is a symbolic link pointing
+
+
+
+December 19 24
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ to nowhere
+
+ While setting _\bl_\bi_\bs_\bt_\bl_\bi_\bn_\bk_\bs can be helpful while navigating
+ around the file system, it slows down _\bl_\bs-_\bF and it causes
+ mounting of file systems if the symbolic links point to an
+ NFS auto-mounted partition.
+
+
+1\b18\b8.\b. G\bGL\bLO\bOB\bBB\bBI\bIN\bNG\bG S\bSY\bYN\bNT\bTA\bAX\bX A\bAD\bDD\bDI\bIT\bTI\bIO\bON\bNS\bS
+ The syntax for any character in a range (for example ".[a-
+ z]*") has been extended so as to conform with standard
+ Unix regular expression syntax (see _\be_\bd(1)). Specifically,
+ after an open bracket ("["), if the first character is a
+ caret ("^") then the character matched will be any not in
+ the range specified. For example:
+
+ > cd ~
+ > echo .[a-z]*
+ .cshrc .emacs .login .logout .menuwmrc
+ > echo .[^.]*
+ .Xdefaults .Xinit .cshrc .emacs .login .logout .menuwmrc
+ >
+
+ Note that the second form includes .Xdefaults and .Xinit
+ because 'X' (and all the lower case letters) are outside
+ of the range of a single '.'.
+
+ Also the ability to negate a globbing pattern has been
+ added:
+
+ > echo *
+ foo foobar bar barfoo
+ > echo ^foo*
+ bar barfoo
+
+ Note that this does not work correctly if the expression
+ does not have any wildcard characters (?*[]) or if the
+ expression has braces {}.
+
+
+1\b19\b9.\b. N\bNE\bEW\bW E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT A\bAN\bND\bD S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+ On startup, _\bt_\bc_\bs_\bh now automatically initializes the envi-
+ ronment variable _\bH_\bO_\bS_\bT to the name of the machine that it
+ is running on. It does this by doing a _\bg_\be_\bt_\bh_\bo_\bs_\bt_\bn_\ba_\bm_\be(2)
+ system call, and setting _\bH_\bO_\bS_\bT to the result.
+
+ _\bT_\bc_\bs_\bh also initializes the environment variable _\bH_\bO_\bS_\bT_\bT_\bY_\bP_\bE to
+ a symbolic name for the type of computer that it is run-
+ ning on. This is useful when sharing a single physical
+ directory between several types of machines (running NFS,
+ for instance). For example, if the following is in
+ ._\bl_\bo_\bg_\bi_\bn:
+
+ set path = (~/bin.$HOSTTYPE /usr/ucb /bin /usr/bin
+
+
+
+December 19 25
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ /usr/games .)
+
+ and the user has directories named "bin._\bm_\ba_\bc_\bh_\bi_\bn_\be" (where
+ _\bm_\ba_\bc_\bh_\bi_\bn_\be is a name from the list below), then the user can
+ have the same programs compiled for different machines in
+ the appropriate "bin._\bm_\ba_\bc_\bh_\bi_\bn_\be" directories and _\bt_\bc_\bs_\bh will
+ run the binary for the correct machine.
+
+ The current possible values are:
+
+ _\ba_\bi_\bx_\b3_\b7_\b0 an IBM 370, running aix
+ _\ba_\bi_\bx_\bE_\bS_\bA an IBM ESA, running aix
+ _\ba_\bl_\bl_\bi_\ba_\bn_\bt an Alliant FX series
+ _\ba_\bm_\bd_\ba_\bh_\bl an Amdahl running uts 2.1
+ _\ba_\bp_\bo_\bl_\bl_\bo an Apollo running DomainOS
+ _\ba_\bt_\bt_\b3_\bb_\b1_\b5 an AT&T 3b15
+ _\ba_\bt_\bt_\b3_\bb_\b2 an AT&T 3b2
+ _\ba_\bt_\bt_\b3_\bb_\b2_\b0 an AT&T 3b20
+ _\ba_\bt_\bt_\b3_\bb_\b5 an AT&T 3b5
+ _\bb_\ba_\bl_\ba_\bn_\bc_\be a Sequent Balance (32000 based)
+ _\bb_\bu_\bt_\bt_\be_\br_\bf_\bl_\by a BBN Computer Butterfly 1000
+ _\bc_\bo_\bn_\bv_\be_\bx a Convex
+ _\bc_\br_\ba_\by a Cray running Unicos
+ _\bd_\be_\bc_\bs_\bt_\ba_\bt_\bi_\bo_\bn a DecStation XXXX
+ _\be_\bt_\ba_\b1_\b0 an ETA 10 running SVR3
+ _\bg_\bo_\bu_\bl_\bd-_\bn_\bp_\b1 a Gould NP1
+ _\bh_\bk_\b6_\b8 a Heurikon HK68 running Uniplus+ 5.0
+ _\bh_\bp_\b3_\b0_\b0 an HP 9000, series 300, running mtXinu
+ _\bh_\bp_\b8_\b0_\b0 an HP 9000, series 800, running mtXinu
+ _\bh_\bp_\b9_\b0_\b0_\b0_\bs_\b3_\b0_\b0 an HP 9000, series 300, running hpux
+ _\bh_\bp_\b9_\b0_\b0_\b0_\bs_\b5_\b0_\b0 an HP 9000, series 500, running hpux
+ _\bh_\bp_\b9_\b0_\b0_\b0_\bs_\b7_\b0_\b0 an HP 9000, series 700, running hpux
+ _\bh_\bp_\b9_\b0_\b0_\b0_\bs_\b8_\b0_\b0 an HP 9000, series 800, running hpux
+ _\bh_\bp an HP, running hpux
+ _\bi_\b3_\b8_\b6 an Intel 386, generic
+ _\bi_\b3_\b8_\b6-_\bm_\ba_\bc_\bh an Intel 386, running mach
+ _\bi_\bn_\bt_\be_\bl_\b3_\b8_\b6 an Intel 386, running INTEL's SVR3
+ _\bi_\br_\bi_\bs_\b3_\bd a Silicon Graphics Iris 3000
+ _\bi_\br_\bi_\bs_\b4_\bd a Silicon Graphics Iris 4D
+ _\bi_\bs_\bc_\b3_\b8_\b6 an Intel 386, running ISC
+ _\bm_\b8_\b8_\bk an mc88000 CPU machine
+ _\bm_\ba_\bc_\b2 an Apple Computer Macintosh II, running AUX
+ _\bm_\ba_\bs_\bs_\bc_\bo_\bm_\bp a Concurrent (Masscomp), running RTU
+ _\bm_\bi_\bn_\bi_\bx_\b3_\b8_\b6 an i386 running minix
+ _\bm_\bi_\bn_\bi_\bx a mac or an amiga running minix
+ _\bm_\bi_\bp_\bs another mips CPU
+ _\bm_\bu_\bl_\bt_\bi_\bm_\ba_\bx an Encore Computer Corp. Multimax (32000 based)
+ _\bn_\be_\bw_\bs a Sony NEWS 800 or 1700 workstation
+ _\bn_\be_\bw_\bs__\bm_\bi_\bp_\bs a NeWS machine with mips CPU
+ _\bn_\bd_\b5_\b0_\b0 a Norsk Data ND 500/5000 running Ndix
+ _\bn_\bs_\b3_\b2_\b0_\b0_\b0 an NS32000 CPU machine
+ _\bn_\be_\bx_\bt a NeXT computer
+ _\bp_\bf_\ba_\b5_\b0 a PFU/Fujitsu A-xx computer
+ _\bp_\bs_\b2 an IBM PS/2, running aix
+
+
+
+December 19 26
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ _\bp_\bt_\bx a Sequent Symmetry running DYNIX/ptx (386/486 based)
+ _\bp_\by_\br_\ba_\bm_\bi_\bd a Pyramid Technology computer (of any flavor)
+ _\br_\bs_\b6_\b0_\b0_\b0 an IBM RS6000, running aix
+ _\br_\bt an IBM PC/RT, running BSD (AOS 4.3) or mach
+ _\br_\bt_\bp_\bc an IBM PC/RT, running aix
+ _\bs_\bc_\bo_\b3_\b8_\b6 an Intel 386, running SCO
+ _\bs_\bt_\be_\bl_\bl_\ba_\br a stellar running stellix
+ _\bs_\bu_\bn a Sun workstation of none of the above types
+ _\bs_\bu_\bn_\b2 a Sun Microsystems series 2 workstation (68010 based)
+ _\bs_\bu_\bn_\b3 a Sun Microsystems series 3 workstation (68020 based)
+ _\bs_\bu_\bn_\b3_\b8_\b6_\bi a Sun Microsystems 386i workstation (386 based)
+ _\bs_\bu_\bn_\b4 a Sun Microsystems series 4 workstation (SPARC based)
+ _\bs_\by_\bm_\bm_\be_\bt_\br_\by a Sequent Symmetry running DYNIX 3 (386/486 based)
+ _\bt_\bi_\bt_\ba_\bn an Stardent Titan
+ _\bu_\bn_\bi_\bx_\bp_\bc an UNIX/PC running SVR1 att7300 aka att3b1
+ _\bv_\ba_\bx a Digital Equipment Corp. Vax (of any flavor)
+
+ (The names of the machines are usually trade marks of the
+ corresponding companies.)
+
+ _\bT_\bc_\bs_\bh also initializes the shell variables _\bu_\bi_\bd and _\bg_\bi_\bd to
+ the value of the current real user ID/GID. This is useful
+ for telling what user/group the shell is running as. Under
+ Domain/OS _\bt_\bc_\bs_\bh will also set _\bo_\bi_\bd indicating the current
+ real organization id.
+
+
+2\b20\b0.\b. C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS F\bFO\bOR\bR D\bDE\bEB\bBU\bUG\bGG\bGI\bIN\bNG\bG
+ Only two such commands are available at this point, both
+ concerned with testing termcap entries.
+ _\bt_\be_\bl_\bl_\bt_\bc tells you, politely, what _\bt_\bc_\bs_\bh thinks of your ter-
+ minal, and _\bs_\be_\bt_\bt_\bc `cap' `value' tells _\bt_\bc_\bs_\bh to believe that
+ the termcap capability `cap' ( as defined in _\bt_\be_\br_\bm_\bc_\ba_\bp(5) )
+ has the value `value'. No checking for sanity is per-
+ formed, so beware of improper use.
+
+
+2\b21\b1.\b. S\bSE\bEA\bAR\bRC\bCH\bHI\bIN\bNG\bG F\bFO\bOR\bR T\bTH\bHE\bE V\bVI\bIS\bSU\bUA\bAL\bL H\bHI\bIS\bST\bTO\bOR\bRY\bY
+ Four new editor functions have been added in emacs mode:
+ Two of them, history-search-backward, bound to M-p (and M-
+ P), and history-search-forward, bound to M-n (and M-N),
+ implement a conventional search mechanism, while the other
+ two, i-search-back and i-search-fwd, both unbound by
+ default, implement the emacs-style incremental search.
+
+ History-search-backward (history-search-forward) searches
+ backward (forward) through the history list for previous
+ (next) occurrence of the beginning of the input buffer as
+ a command. That is, if the user types:
+
+ > echo foo
+ foo
+ > ls
+ filea fileb
+
+
+
+December 19 27
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ > echo bar
+ bar
+ >
+
+ and then types "echo<ESC>p", the shell will place "echo
+ bar" in the editing buffer. If another _\bM-_\bp was entered,
+ the editing buffer would change to "echo foo". This capa-
+ bility is compatible with the plain visual history; if the
+ user were to then enter ^_\bP the editing buffer would be
+ changed to "ls". The pattern used to search through the
+ history is defined by the characters from the beginning of
+ the line up to the current cursor position and may contain
+ a shell globbing pattern. Successive history searches use
+ the same pattern.
+
+ When the incremental search functions are used, a prompt -
+ "bck:" or "fwd:", depending on the chosen direction -
+ appears, and characters typed are appended to the search
+ pattern. The matching command line is placed in the edit-
+ ing buffer, with the cursor positioned at the point where
+ the pattern was found (the incremental search will also do
+ searching within a command line). If the search fails,
+ the terminal bell is rung, and the ':' in the prompt is
+ changed to '?'.
+
+ If these functions are bound to single characters, and one
+ of those is typed again during the incremental search, the
+ search continues in the corresponding direction, with the
+ pattern unchanged; if the previous search failed, this
+ will also cause it to "wrap around" the history list.
+ Finally, the following characters also have a special
+ meaning during the search:
+
+ Delete (or any character bound to _\bb_\ba_\bc_\bk_\bw_\ba_\br_\bd-_\bd_\be_\bl_\be_\bt_\be-_\bc_\bh_\ba_\br)
+ Undo the effect of the last character typed,
+ deleting a character from the pattern if appropriate.
+ ^G Abort the search, back to the last successful one
+ if previous search failed, otherwise entire search.
+ ^W Append the rest of the current word to the pattern.
+ ESC Terminate the search, leaving current line in buffer.
+
+ Any other character, that isn't bound to _\bs_\be_\bl_\bf-_\bi_\bn_\bs_\be_\br_\bt-
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd, terminates the search, leaving the current com-
+ mand line in the editing buffer, after which _\bt_\bc_\bs_\bh inter-
+ prets the character as if it was normal input - notably
+ _\bR_\be_\bt_\bu_\br_\bn will cause the current command line to be executed.
+
+ In vi mode "vi-search-fwd" (bound to '/') and "vi-search-
+ back" (bound to '?') can be used to search the visual
+ history. In command mode '/' or '?' followed by a shell
+ pattern, searches the visual history for the pattern. The
+ pattern can be terminated either with a _\bR_\be_\bt_\bu_\br_\bn, in which
+ case the matched history event is placed in the command
+ buffer or an _\bE_\bs_\bc_\ba_\bp_\be, in which case the matched history
+
+
+
+December 19 28
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ event is executed. If no history event matches the shell
+ pattern then the bell is rung.
+
+
+2\b22\b2.\b. B\bBU\bUI\bIL\bLT\bTI\bIN\bN W\bWH\bHI\bIC\bCH\bH(\b(1\b1)\b)/\b/W\bWH\bHE\bER\bRE\bE C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+ There is now a builtin version of the _\bw_\bh_\bi_\bc_\bh(1) command.
+ The builtin version is just like the original, except that
+ it correctly reports aliases peculiar to this _\bt_\bc_\bs_\bh, and
+ builtin commands. The only other difference is that the
+ builtin runs somewhere between 10 and 100 times faster.
+ There is also a key-function interface to this command:
+ the _\bw_\bh_\bi_\bc_\bh-_\bc_\bo_\bm_\bm_\ba_\bn_\bd function (normally bound to M-?), can be
+ used anywhere on the command line, and will in effect do a
+ 'which' on the command name.
+
+ Similarly where will report all known instances of the
+ command: aliases, builtins, as well as all references in
+ the path.
+
+
+2\b23\b3.\b. R\bRE\bES\bST\bTA\bAR\bRT\bTI\bIN\bNG\bG A\bA S\bST\bTO\bOP\bPP\bPE\bED\bD E\bED\bDI\bIT\bTO\bOR\bR
+ There is another new editor function: run-fg-editor, which
+ is bound to _\bM-^_\bZ. When typed, it saves away the current
+ input buffer, and looks for a stopped job with a name
+ equal to the file name part (last element) of either the
+ EDITOR or VISUAL environment variables (if not defined,
+ the default names are "ed" and "vi" respectively). If
+ such a job is found, then it is restarted as if "fg %_\bn_\ba_\bm_\be"
+ had been typed. This is used to toggle back and forth
+ between an editor and the shell easily. Some people bind
+ this function to ^_\bZ so they can do this even more easily.
+
+
+2\b24\b4.\b. S\bST\bTA\bAT\bTU\bUS\bS L\bLI\bIN\bNE\bE S\bSU\bUP\bPP\bPO\bOR\bRT\bT
+ _\bT_\bc_\bs_\bh has a new builtin called _\be_\bc_\bh_\bo_\bt_\bc that allows the user
+ to access the terminal capabilities from the command line,
+ similar to the system V _\bt_\bp_\bu_\bt(1).
+
+ > echotc home
+
+ Places the cursor at the home position and
+
+ > echotc cm 3 10
+
+ places the cursor at column 3 row 10. This command
+ replaces the _\be_\bl and _\bs_\bl variables that used contain the
+ escape sequences to begin and end status line changes. The
+ command:
+
+ > echo $sl this is a test $el
+
+ is replaced by:
+
+ > echotc ts 0; echo "this is a test"; echotc fs
+
+
+
+December 19 29
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ In addition _\be_\bc_\bh_\bo_\bt_\bc understands the arguments _\bb_\ba_\bu_\bd, _\bl_\bi_\bn_\be_\bs,
+ _\bc_\bo_\bl_\bs, _\bm_\be_\bt_\ba, and _\bt_\ba_\bb_\bs And prints the baud rate, the number
+ of lines and columns, and "yes" or "no" depending if the
+ terminal has tabs or a meta key. This can be useful in
+ determining how terse the output of commands will be
+ depending on the baud rate, or setting limits to commands
+ like history to the highest number so that the terminal
+ does not scroll:
+
+ > set history=`echotc lines`
+ > @ history--
+
+ Note: Termcap strings may contain wildcard characters, and
+ echoing them will not work correctly. The suggested method
+ of setting shell variables to terminal capability strings
+ is using double quotes, as in the following example that
+ places the date in the status line:
+
+ > set tosl="`echotc ts 0`"
+ > set frsl="`echotc fs`"
+ > echo -n "$tosl";date; echo -n "$frsl"
+
+ _\bE_\bc_\bh_\bo_\bt_\bc accepts two flags. The flag -_\bv enables verbose mes-
+ sages and the flag -_\bs ignores any errors and returns the
+ empty string if the capability is not found.
+
+
+
+2\b25\b5.\b. E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN O\bOF\bF A\bA C\bCO\bOM\bMM\bMA\bAN\bND\bD A\bAF\bFT\bTE\bER\bR C\bCH\bHA\bAN\bNG\bGI\bIN\bNG\bG T\bTH\bHE\bE C\bCU\bUR\bRR\bRE\bEN\bNT\bT W\bWO\bOR\bRK\bKI\bIN\bNG\bG
+ D\bDI\bIR\bRE\bEC\bCT\bTO\bOR\bRY\bY
+ _\bT_\bc_\bs_\bh now supports a special alias, _\bc_\bw_\bd_\bc_\bm_\bd, which if set
+ holds a command that will be executed after changing the
+ value of $cwd. For example, if the user is running on an
+ X window system _\bx_\bt_\be_\br_\bm(_\b1), and a re-parenting window man-
+ ager that supports title bars such as _\bt_\bw_\bm(_\b1) _\ba_\bn_\bd _\bh_\ba_\bs _\bd_\bo_\bn_\be:
+
+ > alias cwdcmd 'echo -n "^[]2;${HOST}:$cwd ^G"'
+
+ then the shell will change the title of the running
+ _\bx_\bt_\be_\br_\bm(_\b1) to be the name of the host, a colon, and the full
+ current working directory. A more fancy way to do that
+ is:
+
+ > alias cwdcmd 'echo -n
+ "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
+
+ This will put the hostname and working directory on the
+ title bar but only the hostname in the icon manager menu.
+ Note that if a user defines _\bc_\bw_\bd_\bc_\bm_\bd to contain a _\bc_\bd, _\bp_\bu_\bs_\bh_\bd,
+ or _\bp_\bo_\bp_\bd, command, an infinite loop may result. In this
+ case, it is the author's opinion that said user will get
+ what he deserves.
+
+
+
+
+
+December 19 30
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+2\b26\b6.\b. N\bNA\bAT\bTI\bIV\bVE\bE L\bLA\bAN\bNG\bGU\bUA\bAG\bGE\bE S\bSY\bYS\bST\bTE\bEM\bM
+ _\bT_\bc_\bs_\bh is eight bit clean (if so compiled, see the descrip-
+ tion of the _\bv_\be_\br_\bs_\bi_\bo_\bn shell variable below), and will thus
+ support character sets needing this capability. The _\bt_\bc_\bs_\bh
+ support for NLS differs depending on whether it was com-
+ piled to use the system's NLS (again, see the _\bv_\be_\br_\bs_\bi_\bo_\bn
+ variable) or not. In either case, the default for charac-
+ ter classification (i.e. which characters are printable
+ etc) and sorting is 7-bit ascii, and any setting or unset-
+ ting of the LANG or LC_CTYPE environment variables will
+ cause a check for possible changes in these respects.
+
+ When using the system's NLS, the _\bs_\be_\bt_\bl_\bo_\bc_\ba_\bl_\be C library func-
+ tion will be called to determine appropriate character
+ classification and sorting - this function will typically
+ examine the LANG and LC_CTYPE variables for this purpose
+ (refer to the system documentation for further details).
+ Otherwise, NLS will be simulated, by assuming that the ISO
+ 8859-1 character set is used whenever either of the LANG
+ and LC_CTYPE variables are set, regardless of their val-
+ ues. Sorting is not affected for the simulated NLS.
+
+ In addition, with both real and simulated NLS, all print-
+ able characters in the range \200-\377, i.e. those that
+ have M-<char> bindings, are automatically rebound to _\bs_\be_\bl_\bf-
+ _\bi_\bn_\bs_\be_\br_\bt-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (the corresponding binding for the
+ escape+<char> sequence, if any, is left alone). This
+ automatic rebinding is inhibited if the NOREBIND environ-
+ ment variable is set - this may be useful for the simu-
+ lated NLS, or a primitive real NLS which assumes full ISO
+ 8859-1 (otherwise all M-<char> bindings in the range
+ \240-\377 will effectively be undone in these cases).
+ Explicitly rebinding the relevant keys, using _\bb_\bi_\bn_\bd_\bk_\be_\by, is
+ of course still possible.
+
+ Unknown characters (i.e. those that are neither printable
+ nor control characters) will be printed using the \nnn
+ format. If the tty is not in 8 bit mode, other 8 bit
+ characters will be printed by converting them to ascii and
+ using standout mode. _\bT_\bc_\bs_\bh will never change the 7/8 bit
+ mode of the tty, and will track user-initiated settings
+ for this - i.e. it may be necessary for NLS users (or, for
+ that matter, those that want to use a Meta key) to explic-
+ itly set the tty in 8 bit mode through the appropriate
+ _\bs_\bt_\bt_\by(1) command in e.g. the .login file.
+
+
+2\b27\b7.\b. A\bAU\bUT\bTO\bOM\bMA\bAT\bTI\bIC\bC P\bPR\bRO\bOC\bCE\bES\bSS\bS T\bTI\bIM\bME\bE R\bRE\bEP\bPO\bOR\bRT\bTI\bIN\bNG\bG
+ Automatic process time reporting is a feature that exists
+ in _\bc_\bs_\bh, but it is usually not documented. In addition _\bt_\bc_\bs_\bh
+ provides a slightly enriched syntax. Process time reports
+ are controlled via the _\bt_\bi_\bm_\be shell variable. The first
+ word of the _\bt_\bi_\bm_\be variable indicates the minimum number of
+ CPU seconds the process has to consume before a time
+
+
+
+December 19 31
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ report is produced. The optional second word controls the
+ format of the report. The following sequences are avail-
+ able for the format specification:
+
+ %U The time the process spent in user mode
+ in cpu seconds.
+ %S The time the process spent in kernel mode
+ in cpu seconds.
+ %E The elapsed time in seconds.
+ %P The CPU percentage computed as (%U + %S) / %E.
+
+ The following sequences are supported only in systems that
+ have the BSD resource limit functions.
+
+ %W Number of times the process was swapped.
+ %X The average amount in (shared) text space used
+ in Kbytes.
+ %D The average amount in (unshared) data/stack
+ space used in Kbytes.
+ %K The total space used (%X + %D) in Kbytes.
+ %M The maximum memory the process had in use at
+ any time in Kbytes.
+ %F The number of major page faults (page needed to
+ be brought from disk).
+ %R The number of minor page faults.
+ %I The number of input operations.
+ %O The number of output operations.
+ %r The number of socket messages received.
+ %s The number of socket messages sent.
+ %k The number of signals received.
+ %w Number of voluntary context switches (waits).
+ %c Number of involuntary context switches.
+
+ The default time format is "%Uu %Ss %E %P %X+%Dk %I+%Oio
+ %Fpf+%Ww" for systems that support resource usage report-
+ ing and "%Uu %Ss %E %P" for systems that do not.
+
+ For Sequent's DYNIX/ptx %X, %D, %K, %r and %s are not sup-
+ ported. However, the following additional sequences are
+ available.
+
+ %Y The number of system calls performed.
+ %Z The number of pages which are zero-filled
+ on demand.
+ %i The number of times a process' resident
+ set size was increased by the kernel.
+ %d The number of times a process' resident
+ set size was decreased by the kernel.
+ %l The number of read system calls performed.
+ %m The number of write system calls performed.
+ %p the number of reads from raw disk devices.
+ %q the number of writes to raw disk devices.
+
+ The default time format for Sequent's DYNIX/ptx is "%Uu
+
+
+
+December 19 32
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ %Ss $E %P %I+%Oio %Fpf+%Ww". Also note that the CPU per-
+ centage can be higher than 100% on multi-processors.
+
+
+2\b28\b8.\b. O\bOS\bS/\b/D\bDE\bEP\bPE\bEN\bND\bDE\bEN\bNT\bT B\bBU\bUI\bIL\bLT\bTI\bIN\bN S\bSU\bUP\bPP\bPO\bOR\bRT\bT
+ _\bT_\bR_\bA_\bN_\bS_\bP_\bA_\bR_\bE_\bN_\bT _\bC_\bO_\bM_\bP_\bU_\bT_\bI_\bN_\bG _\bF_\bA_\bC_\bI_\bL_\bI_\bT_\bY
+
+ On systems that support TCF (aix-ibm370, aix-ps2) the fol-
+ lowing builtins have been added:
+
+ g\bge\bet\bts\bsp\bpa\bat\bth\bh Print the current system execution path.
+
+ s\bse\bet\bts\bsp\bpa\bat\bth\bh L\bLO\bOC\bCA\bAL\bL|\b|<\b<s\bsi\bit\bte\be>\b>|\b|<\b<c\bcp\bpu\bu>\b> .\b..\b..\b.
+ Set the current execution path.
+
+
+ g\bge\bet\btx\bxv\bve\ber\brs\bs Print the current experimental version prefix.
+
+
+ s\bse\bet\btx\bxv\bve\ber\brs\bs [\b[<\b<s\bst\btr\bri\bin\bng\bg>\b>]\b]
+ If the optional string is ommited, any experi-
+ mental version prefix is removed. Otherwise the
+ experimental version prefix is set to string.
+
+
+ m\bmi\big\bgr\bra\bat\bte\be [\b[-\b-<\b<s\bsi\bit\bte\be>\b>]\b] <\b<p\bpi\bid\bd>\b>|\b|%\b%<\b<j\bjo\bob\bbi\bid\bd>\b> .\b..\b..\b.
+ m\bmi\big\bgr\bra\bat\bte\be -\b-<\b<s\bsi\bit\bte\be>\b>
+ The first form migrates the process or job to
+ the site specified or the default site deter-
+ mined by the system path. The second form, is
+ equivalent to 'migrate -<site> $$', i.e.
+ migrates the current process to the site speci-
+ fied. Note: migrating _\bt_\bc_\bs_\bh itself can cause
+ unexpected behavior, since the shell does not
+ like to lose its tty.
+
+
+ In addition, jobs will print the site the job is execut-
+ ing.
+
+
+ _\bD_\bo_\bm_\ba_\bi_\bn/_\bO_\bS _\bS_\bu_\bp_\bp_\bo_\br_\bt
+
+
+ i\bin\bnl\bli\bib\bb <\b<s\bsh\bha\bar\bre\bed\bd-\b-l\bli\bib\bbr\bra\bar\bry\by>\b> .\b..\b..\b.
+ Inlib adds shared libraries to the current environ-
+ ment. There is no way to remove them...
+
+ r\bro\boo\bot\btn\bno\bod\bde\be /\b//\b/<\b<n\bno\bod\bde\ben\bna\bam\bme\be>\b>
+ Change the name of the current rootnode. From now
+ on, / will resolve to //<_\br_\bo_\bo_\bt_\bn_\bo_\bd_\be>
+
+ v\bve\ber\br [\b[<\b<s\bsy\bys\bst\bty\byp\bpe\be>\b>]\b] [\b[<\b<c\bco\bom\bmm\bma\ban\bnd\bd>\b>]\b]
+ Without arguments, print $_\bS_\bY_\bS_\bT_\bY_\bP_\bE; with the
+
+
+
+December 19 33
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ <_\bs_\by_\bs_\bt_\by_\bp_\be> provided, set _\bS_\bY_\bS_\bT_\bY_\bP_\bE to the one pro-
+ vided. Valid systypes are bsd4.3 and sys5.3. If a
+ <_\bc_\bo_\bm_\bm_\ba_\bn_\bd> is argument is given, then <_\bc_\bo_\bm_\bm_\ba_\bn_\bd> is
+ executed under the <_\bs_\by_\bs_\bt_\by_\bp_\be> specified.
+
+
+ _\bM_\ba_\bc_\bh
+
+
+ s\bse\bet\btp\bpa\bat\bth\bh <\b<p\bpa\bat\bth\bh-\b-s\bsp\bpe\bec\bc>\b> .\b..\b..\b.
+ XXX: What does it do?
+
+
+ _\bM_\ba_\bs_\bs_\bc_\bo_\bm_\bp/_\bR_\bT_\bU
+
+
+ u\bun\bni\biv\bve\ber\brs\bse\be <\b<u\bun\bni\biv\bve\ber\brs\bse\be-\b-s\bsp\bpe\bec\bc>\b> .\b..\b..\b.
+ Sets the current universe to the specified parame-
+ ter.
+
+
+ _\bC_\bo_\bn_\bv_\be_\bx/_\bO_\bS
+
+
+ w\bwa\bar\brp\bp [\b[<\b<u\bun\bni\biv\bve\ber\brs\bse\be-\b-s\bsp\bpe\bec\bc>\b>]\b] .\b..\b..\b.
+ Without arguments prints the current value of the
+ universe. With a universe argument it sets the cur-
+ rent universe to the value of the argument.
+
+
+2\b29\b9.\b. W\bWI\bIN\bND\bDO\bOW\bW S\bSI\bIZ\bZE\bE T\bTR\bRA\bAC\bCK\bKI\bIN\bNG\bG
+ On systems that support SIGWINCH or SIGWINDOW, _\bt_\bc_\bs_\bh adapts
+ to window resizing automatically and adjusts the environ-
+ ment variables LINES and COLUMNS if set. Also if the envi-
+ ronment variable TERMCAP contains li#, and co# fields,
+ these will be adjusted also to reflect the new window
+ size.
+
+
+3\b30\b0.\b. I\bIN\bNP\bPU\bUT\bT F\bFI\bIL\bLE\bES\bS
+ On startup _\bt_\bc_\bs_\bh will try to source /_\be_\bt_\bc/_\bc_\bs_\bh._\bc_\bs_\bh_\br_\bc and then
+ /_\be_\bt_\bc/_\bc_\bs_\bh._\bl_\bo_\bg_\bi_\bn if the shell is a login shell. Then it will
+ try to source $_\bH_\bO_\bM_\bE/._\bt_\bc_\bs_\bh_\br_\bc and then $_\bH_\bO_\bM_\bE/._\bc_\bs_\bh_\br_\bc if
+ $_\bH_\bO_\bM_\bE/._\bt_\bc_\bs_\bh_\br_\bc is not found. Then it will source
+ $_\bH_\bO_\bM_\bE/._\bl_\bo_\bg_\bi_\bn if the shell is a login shell. On exit _\bt_\bc_\bs_\bh
+ will source first /_\be_\bt_\bc/_\bc_\bs_\bh._\bl_\bo_\bg_\bo_\bu_\bt and then $_\bH_\bO_\bM_\bE/._\bl_\bo_\bg_\bo_\bu_\bt
+ if the shell was a login shell.
+
+ Note: On _\bc_\bo_\bn_\bv_\be_\bx_\bo_\bs and _\bs_\bt_\be_\bl_\bl_\bi_\bx the names of the system
+ default files are /_\be_\bt_\bc/_\bc_\bs_\bh_\br_\bc , /_\be_\bt_\bc/_\bl_\bo_\bg_\bi_\bn and /_\be_\bt_\bc/_\bl_\bo_\bg_\bo_\bu_\bt
+ respectively. On the NeXT the names are also different:
+ /_\be_\bt_\bc/_\bc_\bs_\bh_\br_\bc._\bs_\bt_\bd , /_\be_\bt_\bc/_\bl_\bo_\bg_\bi_\bn._\bs_\bt_\bd and /_\be_\bt_\bc/_\bl_\bo_\bg_\bo_\bu_\bt._\bs_\bt_\bd
+ Finally on _\bi_\br_\bi_\bx, _\bA/_\bU_\bX and the _\bc_\br_\ba_\by only the file
+ /_\be_\bt_\bc/_\bc_\bs_\bh_\br_\bc is executed if the shell is a login shell.
+
+
+
+December 19 34
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+3\b31\b1.\b. C\bCO\bOM\bMM\bMA\bAN\bND\bD L\bLI\bIN\bNE\bE O\bOP\bPT\bTI\bIO\bON\bNS\bS
+ This section describes options that are either undocu-
+ mented in _\bc_\bs_\bh (*) or present only in _\bt_\bc_\bs_\bh. (+)
+
+
+ -_\bd Load ~/.cshdirs (If _\bt_\bc_\bs_\bh was compiled with CSHDIRS
+ enabled)(+)
+
+ -_\bD_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be]
+ Set environment variable name to value. (Domain/OS
+ only) (+)
+
+ -_\bF Use fork() instead of vfork() to spawn processes.
+ (Convex/OS only) (+)
+
+ -_\bl Make _\bt_\bc_\bs_\bh behave like a login shell. (+)
+
+ -_\bm Allow reading of a .cshrc that does not belong to the
+ effective user. Newer versions of _\bs_\bu(_\b1) can pass that
+ to the shell. (some versions of csh have it) (+*)
+
+ -_\bq Make the shell accept SIGQUIT, and behave when it is
+ used under a debugger. Job control is disabled. (*)
+
+
+3\b32\b2.\b. H\bHI\bIS\bST\bTO\bOR\bRY\bY A\bAN\bND\bD V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bE M\bMO\bOD\bDI\bIF\bFI\bIE\bER\bR E\bEN\bNH\bHA\bAN\bNC\bCE\bEM\bME\bEN\bNT\bTS\bS
+ _\bT_\bc_\bs_\bh accepts more than one variable modifier per variable
+ or history expansion. For example, in _\bc_\bs_\bh(_\b1) the follow-
+ ing command expands to:
+
+ % set a=/usr/local/foo.bar.baz
+ % echo $a:t:r:e
+ foo.bar.baz:r:e
+
+ but in _\bt_\bc_\bs_\bh:
+
+ > set a=/usr/local/foo.bar.baz
+ > echo $a:t:r:e
+ bar
+
+ This bug fix changes slightly the input syntax of _\bc_\bs_\bh,
+ causing expressions of the form to have invalid syntax:
+
+ > set a=/usr/local/foo.bar.baz
+ > echo $a:t:$cwd
+ Unknown variable modifier.
+
+ Which is the correct behavior, since after the second
+ colon a variable modifier is expected and `$' is found.
+ Expressions like this should be re-written as:
+
+ > echo ${a:t}:$cwd
+
+ Also _\bt_\bc_\bs_\bh has an additional : character _\ba which applies
+
+
+
+December 19 35
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ the current modifier multiple times in the same word, in
+ the same way _\bg applies the modifier once in each word:
+
+ > set foo=(a:b:c d:e:f)
+ > echo $foo:s/:/ /
+ a b:c d:e:f
+ > echo $foo:gs/:/ /
+ a b:c d e:f
+ > echo $foo:as/:/ /
+ a b c d:e:f
+ > echo $foo:ags/:/ /
+ a b c d e f
+
+ The _\bc_\bs_\bh expert will notice in the above example another
+ _\bt_\bc_\bs_\bh enhancement. In _\bc_\bs_\bh the _\bs modifier does not work for
+ variables.
+
+ The _\ba character works correctly with other modifiers, for
+ example:
+
+ > echo $host
+ tesla.ee.cornell.edu
+ > echo $host:r
+ tesla.ee.cornell
+ > echo $host:ar
+ tesla
+
+ _\bN_\bo_\bt_\be: The _\ba character causes a modifier to be applied to a
+ word repeatedly until the modifier fails. This can lead to
+ an infinite loop in the current implementation when used
+ with the _\bs modifier. For example :as/f/ff/ will never ter-
+ minate. This behavior might change in the future.
+
+
+F\bFY\bYI\bI
+ This shell uses cbreak mode but takes typed-ahead charac-
+ ters anyway. You can still use _\bs_\bt_\bt_\by(1) to set some of the
+ modes of your terminal (but not bindings).
+
+ This shell will restore your tty to a sane mode if it
+ appears to return from some command in raw, cbreak, or
+ noecho mode. This behavior can be changed using _\bs_\be_\bt_\bt_\by.
+
+
+E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ HPATH -- path to look for command documentation
+ LANG -- used to give preferred character environment (see
+ NLS)
+ LC_CTYPE -- used to change only ctype character handling
+ (see NLS)
+ NOREBIND -- inhibits rebinding of printable characters to
+ self-insert-command
+ PATH -- path to look for command execution
+ SHLVL -- current shell level nesting
+
+
+
+December 19 36
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ TERM -- used to tell how to handle the terminal
+ LINES -- Number of lines in terminal (see WINDOW SIZE)
+ COLUMNS -- Number of columns in terminal (see WINDOW SIZE)
+ TERMCAP -- Terminal capability string (see WINDOW SIZE)
+ SYSTYPE -- The current system type (Domain OS only)
+
+
+N\bNE\bEW\bW S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS
+ a\bad\bdd\bds\bsu\buf\bff\bfi\bix\bx add a / for directories, and a space for normal
+ files when complete matches a name exactly. If
+ unset don't add anything extra.
+
+ a\bam\bmp\bpm\bm show all times in 12 hour, AM/PM format.
+
+ a\bau\but\bto\boc\bco\bor\brr\bre\bec\bct\bt
+ Correct mis-spelled path components automati-
+ cally before attempting completion.
+
+ a\bau\but\bto\boe\bex\bxp\bpa\ban\bnd\bd
+ invoke the expand-history function automatically
+ on completion.
+
+ a\bau\but\bto\bol\bli\bis\bst\bt list possibilities on an ambiguous completion.
+
+ a\bau\but\bto\bol\blo\bog\bgo\bou\but\bt
+ The first word indicates number of minutes of
+ inactivity before automatic logout. The
+ optional second word indicates the number of
+ minutes of inactivity after which the user will
+ be prompted for his login password to enter a
+ command.
+
+ b\bba\bac\bck\bks\bsl\bla\bas\bsh\bh_\b_q\bqu\buo\bot\bte\be
+ makes the backslash quote \, ', and ". This
+ option changes the parsing mechanism for tcsh,
+ and it can cause syntax errors in _\bc_\bs_\bh scripts.
+
+ c\bch\bha\bas\bse\be_\b_s\bsy\bym\bml\bli\bin\bnk\bks\bs
+ always resolve symbolic links to real names on
+ cd, etc.
+
+ c\bco\bor\brr\bre\bec\bct\bt automatically try to correct the spelling of
+ commands. Must be set to either correct=cmd,
+ only command name will be corrected, or cor-
+ rect=all, the whole line will be corrected.
+
+ d\bde\bex\bxt\btr\bra\bac\bct\bt extract a directory on pushd rather than rotat-
+ ing.
+
+ e\bed\bdi\bit\bt use the input editor, set by default.
+
+ f\bfi\big\bgn\bno\bor\bre\be list of file name suffixes (e.g. .o, ~) to
+ ignore during complete.
+
+
+
+
+December 19 37
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ g\bgi\bid\bd the current real group id.
+
+ h\bhi\bis\bst\btl\bli\bit\bt If set, history lines in the editor will be
+ shown with its literal value (that is the line
+ as it was input) instead of the shells lexical
+ version. The current history line can be toggled
+ between literal and lexical with the toggle-
+ literal-history function. History lines saved
+ at shell exit are also saved as this variable
+ indicates.
+
+ h\bhi\bis\bst\btf\bfi\bil\ble\be If set, it contains the full path-name where a
+ history file is read/written. It defaults to
+ $home/.history. This is useful when sharing the
+ same home directory in different machines, or if
+ one wants to save all the histories in the tty
+ sessions. It is usually set in .cshrc for inter-
+ active shells, because history is sourced
+ between .cshrc and .login so that it is avail-
+ able from .login.
+
+ i\big\bgn\bno\bor\bre\be_\b_s\bsy\bym\bml\bli\bin\bnk\bks\bs
+ don't resolve symbolic links to real names on
+ cd, etc.
+
+ l\bli\bis\bst\btj\bjo\bob\bbs\bs list all jobs when suspending. set
+ listjobs=long, produces long format.
+
+ l\bli\bis\bst\btl\bli\bin\bnk\bks\bs Resolve symbolic links when listing files so
+ that the correct filetype is shown.
+
+ l\bli\bis\bst\btm\bma\bax\bx maximum number of items to list without asking
+ first.
+
+ m\bma\bat\btc\bch\bhb\bbe\bee\bep\bp control beeping on completion. With match-
+ beep=nomatch, completion only beeps when there
+ is no match, with matchbeep=ambiguous, beeps
+ also when there are multiple matches, with
+ matchbeep=notunique, beeps when there is one
+ exact and other longer matches, with match-
+ beep=never, it never beeps.
+
+ n\bno\bob\bbe\bee\bep\bp Disables beeping completely.
+
+ o\boi\bid\bd The organization id number (Domain OS only).
+
+ p\bpr\bri\bin\bnt\bte\bex\bxi\bit\btv\bva\bal\blu\bue\be
+ if an interactive program exits non-zero, print
+ the exit value.
+
+ p\bpr\bro\bom\bmp\bpt\bt the string to prompt with.
+
+ p\bpr\bro\bom\bmp\bpt\bt2\b2 the string to prompt for while and for loops
+ with.
+
+
+
+December 19 38
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ p\bpr\bro\bom\bmp\bpt\bt3\b3 the string to prompt with when automatic
+ spelling correction has corrected a command
+ line.
+
+ p\bpu\bus\bsh\bhd\bdt\bto\boh\bho\bom\bme\be
+ make pushd with no args do a "pushd ~" (like cd
+ does).
+
+ p\bpu\bus\bsh\bhd\bds\bsi\bil\ble\ben\bnt\bt
+ do not print the dir stack on every pushd and
+ popd.
+
+ r\bre\bec\bce\bex\bxa\bac\bct\bt recognize exact matches even if they are ambigu-
+ ous.
+
+ r\bre\bec\bco\bog\bgn\bni\biz\bze\be_\b_o\bon\bnl\bly\by_\b_e\bex\bxe\bec\bcu\but\bta\bab\bbl\ble\bes\bs
+ list choices of commands only displays files in
+ the path that are executable (slow).
+
+ r\brm\bms\bst\bta\bar\br Prompt the user before execution of `rm *'.
+
+ s\bsa\bav\bve\beh\bhi\bis\bst\bt number of history items to save between login
+ sessions.
+
+ s\bsh\bhl\blv\bvl\bl Integer value indicating the number of nested
+ shells.
+
+ s\bsh\bho\bow\bwd\bdo\bot\bts\bs show hidden files in list and complete opera-
+ tions.
+
+ t\btc\bcs\bsh\bh Contains the current version of the shell as
+ R.VV.PP. The _\bR indicates the major release num-
+ ber, the _\bV_\bV the current version and the _\bP_\bP the
+ patchlevel.
+
+ t\bte\ber\brm\bm the terminal type; see above.
+
+ t\btp\bpe\ber\bri\bio\bod\bd periodic command wait period (in minutes).
+
+ t\btt\bty\by The name of the tty, or empty if not attached to
+ one.
+
+ u\bui\bid\bd the current real user ID.
+
+ v\bve\ber\brs\bsi\bio\bon\bn the version ID stamp for this _\bt_\bc_\bs_\bh. It con-
+ tains, the origin of this version of _\bt_\bc_\bs_\bh, the
+ date this version was released and a string con-
+ taining a comma separated list of the compile
+ time options enabled:
+ 8b 7b If tcsh was compiled to be eight bit clean
+ or not. The default is 8b.
+ nls Set if tcsh uses the system's NLS, should be
+ the default for systems that have NLS.
+ lf Set if tcsh should execute .login before
+
+
+
+December 19 39
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ .cshrc on login shells. Default is not set.
+ dl Set if tcsh should put . last on the path
+ for security. Default is set.
+ vi Set if tcsh's default editor is vi. Default
+ is unset (emacs)
+ dtr Set if tcsh should drop dtr on login shells
+ when exiting. Default is unset.
+ bye Set if tcsh should accept bye in addition
+ to logout, and rename log to watchlog.
+ Default is unset.
+ al Set if tcsh should determine if autologout
+ should be enabled. The default is set.
+ dir Set if tcsh should save and restore the directory
+ stack.
+ kan Set if tcsh is compiled for Kanji.
+ (ignore the iso character set.) Default is unset.
+ sm Set if tcsh was compiled to use the system's malloc.
+
+ In addition to the above strings, administrators can enter
+ local strings to indicate differences in the local ver-
+ sion.
+
+
+ v\bvi\bis\bsi\bib\bbl\ble\beb\bbe\bel\bll\bl
+ use the visible bell (screen flash) rather than
+ audible bell.
+
+ w\bwa\bat\btc\bch\bh list of events to watch.
+
+ w\bwh\bho\bo format string for the printouts generated when
+ _\bw_\ba_\bt_\bc_\bh is set.
+
+ w\bwo\bor\brd\bdc\bch\bha\bar\brs\bs list of non-alphanumeric characters considered
+ part of a word for the purpose of the forward-
+ word, backward-word etc functions -- defaults to
+ "*?_-.[]~=".
+
+
+N\bNE\bEW\bW S\bSP\bPE\bEC\bCI\bIA\bAL\bL A\bAL\bLI\bIA\bAS\bSE\bES\bS
+ _\bc_\bw_\bd_\bc_\bm_\bd the command is run after every change of working
+ directory.
+
+ _\bp_\be_\br_\bi_\bo_\bd_\bi_\bc the command to be run every _\bt_\bp_\be_\br_\bi_\bo_\bd minutes.
+
+ _\bp_\br_\be_\bc_\bm_\bd the command to be run prior to printing each
+ prompt.
+
+ _\bb_\be_\be_\bp_\bc_\bm_\bd the command to be run every time _\bt_\bc_\bs_\bh wants to
+ echo the terminal bell.
+
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+ xterm(1), twm(1), csh(1), chsh(1), termcap(5), termio(7)
+
+
+
+
+December 19 40
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+B\bBU\bUG\bGS\bS
+ The screen update for lines longer than the screen width
+ is very poor if the terminal cannot move the cursor up
+ (i.e. terminal type "dumb").
+
+ I am certain that there are bugs. Bugs (preferably with
+ fixes) should be sent to Christos Zoulas (chris-
+ tos@ee.cornell.edu).
+
+
+V\bVE\bER\bRS\bSI\bIO\bON\bN
+ This man page documents tcsh 6.01.00 (Cornell) 12/19/91.
+
+
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
+ Ken Greer, HP Labs, 1981
+ Wrote the command completion.
+
+ Mike Ellis, Fairchild, 1983
+ Added command name recognition/completion.
+
+ Paul Placeway, Ohio State CIS dept., 1983
+ Added the command line editor.
+
+ Rayan Zachariassen, University of Toronto, 1984
+ Added the builtin _\bw_\bh_\bi_\bc_\bh feature to the editor, and the
+ code for _\bl_\bs-_\bF . Also numerous bug fixes, modifications,
+ and performance enhancements.
+
+ Chris Kingsley, Caltech
+ Wrote the fast storage allocator routines (nmalloc.c).
+
+ Karl Kleinpaste, CCI 1983-4
+ Added special aliases, directory stack extraction stuff,
+ login/logout watch, and scheduled events. Also came up
+ with the idea of the new prompt format.
+
+ Paul Placeway, Ohio State CIS dept., 1987
+ Re-wrote the editor, cleaned up other code, and added the
+ prompt routines, added to the syntax for file name expres-
+ sions, and sped up the shell some.
+
+ Chris Grevstad, TRW, 1987
+ Ported the 4.3 csh sources to tcsh.
+
+ Christos S. Zoulas, Cornell U. EE dept., 1987-91
+ ported tcsh to HPUX, and System V rel. 2 and 3 and wrote a
+ SysV version of getwd.c. Added SHORT_STRINGS support. New
+ version of sh.glob.c.
+
+ James J Dempsey, BBN, 1988, and Paul Placeway, OSU, 1988
+ Re-ported tcsh to A/UX.
+
+
+
+
+
+December 19 41
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+B\bBU\bUG\bGF\bFI\bIX\bXE\bES\bS A\bAN\bND\bD E\bEN\bNH\bHA\bAN\bNC\bCE\bEM\bME\bEN\bNT\bTS\bS
+ Scott Krotz, Motorola, 1991
+ Minix port.
+
+ David Dawes, Sydney U. Australia, Physics dept., 1991
+ SVR4 job control fixes. (reverse pipeline startup code,
+ and signal fixes).
+
+ Jose Sousa, Interactive Systems Corp., 1991
+ Extended vi fixes. Added delete command in vi.
+
+ Marc Horowitz, MIT, 1991
+ Ansification fixes, new exec hashing code, imake fixes,
+ where builtin.
+
+ Eric Schnoebelen, Convex, 1990
+ Convex support, lots of csh bug fixes, save and restore of
+ directory stack.
+
+ Jaap Vermeulen, Sequent, 1990-91
+ Vi mode fixes, expand-line, window change fixes, ported to
+ symmetry machines.
+
+ Ron Flax, Apple, 1990
+ Ported again to A/UX 2.0
+
+ Dan Oscarsson, LTH Sweden, 1990
+ NLS support and simulated for non NLS sites. Correction
+ of file names also handles the case when the / is replaced
+ by another character. The editor does not switch into
+ cbreak mode unless needed. The shell will not use charac-
+ ter attributes when output is not to a tty.
+
+ Johan Widen, SICS Sweden, 1990
+ Shell level variable, mach support, correct-line, 8-bit
+ printing.
+
+ Matt Day, Sanyo Icon, 1990
+ Added POSIX termio support; Fixed limit stuff for SysV.
+
+ Hans J. Albertsson (Sun Sweden)
+ Added the ampm variable handling, DING!, and the settc and
+ telltc builtins.
+
+ Michael Bloom
+ Fixed some of the interrupt handling.
+
+ Michael Fine, Digital Equipment Corp
+ added the extended key support.
+
+ Daniel Long, NNSC, 1988
+ Added the wordchars variable.
+
+ George Hartzell, MCD Biology, University of Colorado-
+
+
+
+December 19 42
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ Boulder, 1988
+ Fixed the always resetting to DEL bug.
+
+ Patrick Wolfe, Kuck and Associates, Inc., 1988
+ Cleaned up VI mode and wrote the new editor description
+ (in section 1).
+
+ Jak Kirman, 1988
+ Fixed the SunOS 4 giant stack allocation bug.
+
+ Bruce Robertson, Tektronix, 1989
+ Fixed setting erase and kill (again).
+
+ David C Lawrence, Rensselaer Polytechnic Institute, 1989
+ Added "autolist" variable and code to list possibilities
+ on ambiguous completion.
+
+ Martin Boyer, Institut de recherche d'Hydro-Quebec, 1991.
+ Modified "autolist" variable and code to give options on
+ beeping behavior. Modified the history search to search
+ for the whole string from the beginning of the line to the
+ cursor.
+
+ Alec Wolman, DEC, 1989
+ Added code to allow newlines in the prompt.
+
+ Matt Landau, BBN, 1989
+ Fixed YP bugs on Suns, added .tcshrc stuff.
+
+ Ray Moody, Purdue Physics, 1989
+ Added the code to do magic spacebar history expansion.
+
+ Mordechai ????, Intel, 1989
+ Re-arranged the printprompt() routine to use a switch(*cp)
+ (rather than a bunch of ifs), and added a few things to
+ it.
+
+ Josh Siegel, dspo.gov, 1989
+ Fixed "fg-editor" and added the status line shell vari-
+ ables "sl" and "el".
+
+ Karl Berry, UMB, 1989
+ Fixed a bug involving environ (in sh.func.c) on NeXT com-
+ puters.
+
+ Michael Greim, Universitaet des Saarlandes, Saarbruecken,
+ W-Germany,
+ Fixed the nested backquote bug (yes, you can do it; think
+ about aliases) in 4.2 csh. This fix was posted to
+ comp.bugs.4bsd.
+
+ Kazuhiro Honda, Department of Computer Science, Keio Uni-
+ versity, 1989
+ Added the code for automatic spelling correction, the
+
+
+
+December 19 43
+
+
+
+
+
+TCSH(1) 1991 TCSH(1)
+
+
+ prompt3 stuff (the autocorrect prompt), and HOSTTYPE sym-
+ bols for the Sony NEWS.
+
+ Paul Placeway, BBN, 1990
+ Fixed character redrawing code insert bugs, and made
+ redrawing code handle multiple character movement, insert,
+ and delete (if it exists). Fixed setting of SHELL.
+
+ Per Hedeland, Ellemtel, Sweden, 1990
+ Various bugfixes and improvements, e.g. in history expan-
+ sion, autolist, added autoexpand, updated the manual.
+
+T\bTH\bHA\bAN\bNK\bKS\bS T\bTO\bO
+ A special thanks to: Bryan Dunlap, Clayton Elwell, Karl
+ Kleinpaste, Bob Manson, Steve Romig, Diana Smetters, Bob
+ Sutterfield, Mark Verber, Elizabeth Zwicky, and all the
+ other people at Ohio State for suggestions and encourage-
+ ment.
+
+ Also, thanks to all the people on the net for putting up
+ with, reporting bugs in, and suggesting new additions to
+ the old tcsh editor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+December 19 44
+
+