.TH NEWSHELL 1 .SH NAME newshell \- New C shell with tenex-like file name and command completion .SH DESCRIPTION We have installed an enhanced version of the Berkeley UNIX C shell .I csh (1). It behaves exactly like the C shell, except for the added utilities of: .PP .in +6 .ti -3 1) Interactive file name, command, and user name recognition and completion. .sp .ti -3 2) Command/File/Directory/User list in the middle of a typed command. .sp .ti -3 3) Optional timer for automatic logout after selected idle time. .sp .ti -3 4) Terminal mode sanity checking. .sp .ti -3 5) Saving history between logouts. .in -6 .PP A description of these features follows. For information on the other standard .I csh features, please see "man csh". .SH "1. FILE NAME COMPLETION" In typing file names as arguments to commands, it is no longer necessary to type a complete name, only a unique abbreviation is necessary. When you type an ESCAPE to .I csh it will complete the file name for you, echoing the full name on the terminal. .PP If the file name prefix you typed matches no file name, the terminal bell is enunciated. The file name may be partially completed if the prefix matches several longer file names. If this is the case, the name is extended up to the ambiguous deviation, and the bell is enunciated. .PP .I Example .PP In the following example, assume the plus character ``+'' is where the user typed the ESCAPE key. Assume the current directory contained the files: .sp .nf DSC.OLD bin cmd lib memos DSC.NEW chaosnet cmtest mail netnews bench class dev mbox new .fi .sp The command: .sp % vi ch+ .sp would cause .I csh to complete the command with the name \fIchaosnet\fR. If instead, the user had typed: .sp % vi D+ .sp .I csh would have extended the name to \fIDSC.\fR and enunciated the terminal bell, indicating partial completion. .PP File name completion works equally well when other directories are addressed. In addition, the tilde (~) convention for home directories is understood in this context. Thus, .sp % cd ~speech/data/fr+ .sp does what one might expect. This may also be used to expand login names only. Thus, .sp % cd ~sy+ .sp does a .I cd to the .I synthesis directory. .SH "2. FILE/DIRECTORY LIST" At any point in typing a command, you may request "what files are available" or "what files match my current specification". Thus, when you have typed, perhaps: .sp % cd ~speech/data/bench/fritz/ .sp you may wish to know what files or subdirectories exist (in ~speech/data/bench/fritz), without, of course, aborting the command you are typing. Typing the character Control-D at this point, will list the files available. The files are listed in multicolumn format, sorted column-wise. Directories and executable files are indicated with a trailing `/' and `*', respectively. Once printed, the command is re-echoed for you to complete. .PP Additionally, one may want to know which files match a prefix, the current file specification so far. If the user had typed: .sp % cd ~speech/data/bench/fr .sp followed by a control-D, all files and subdirectories whose prefix was ``fr'' in the directory ~speech/data/bench would be printed. Notice that the example before was simply a degenerate case of this with a null trailing file name. (The null string is a prefix of all strings.) Notice also, that a trailing slash is required to pass to a \fInew\fR sub-directory for both file name completion and listing. .PP Notice, the degenerate case .sp % ~^D .sp will print a full list of login names on the current system. .SH "3. COMMAND NAME RECOGNITION" Command name recognition and completion works in the same manner as file name recognition and completion above. The current value of the environment variable \fBPATH\fR is used in searching for the command. For example .sp % newa+ .sp might expand to .sp % newaliases .sp Also, .sp % new^D .sp would list all commands (along PATH) that begin with "new". .PP As an option, if the shell variable \fIlistpathnum\fR is set, then a number indicating the index in PATH is printed next to each command on a ^D listing. .SH "4. AUTO-LOGOUT" A new shell variable has been added called \fIautologout\fB. If the terminal remains idle (no character input) at the shell's top level for the number of minutes greater than the autologout value, you are automatically logged off. This feature was added primarily for security reasons as people often forget to log off when they leave, permitting anyone to walk by and peruse your mail, or private files. .PP The autologout feature is temporarily disabled while a command is executing. The initial value of \fIautologout\fB is 60. If unset or set to 0, autologout is entirely disabled. .PP .SH "5. SANITY" The shell will now restore your terminal to a sane mode if it appears to return from some command in raw, cbreak, or noecho mode. .PP .SH "6. SAVEING HISTORY" The shell now has the facility to save your history list between login session. If the shell variable \fBsavehist\fR is set to a number then that number of commands from your history list is saved. For example, placing the line .PP set history=50 savehist=50 .PP in your .cshrc file maintains a history list of length 50 and saves the entire list when you logout, to be retored when you login next. The commands are saved in the file \fB.history\fR in your login directory. .SH "F.Y.I." This shell uses neither raw or cbreak mode. It works by (temporarily) setting the "additional" tty break character to ESC. There is no overhead usually associated by programs which run in raw or cbreak mode. .PP If you select ESC as your default additonal break character, then you will be able to do recognition on typeahead. .PP The "vb" (visible bell) is used in place of the terminal bell if it exists in the termcap entry for your terminal. .SH FILES /usr/local/lib/builtins/* - fake list of builtin commands .sp /etc/termcap - to discover vb (visible bell) .SH SEE ALSO csh (1) .SH BUGS A control-D on a blank line (a degenerate case of the List command) logs you out, of course. (But try , which lists all commands on the system along PATH). .PP It would be nice if you could change the command characters to something else and not just be stuck with ESC and ^D. .PP Typing \fIimmediately\fR after hitting ESC before recognition expansion completes will result in character juxtaposition or loss. .PP Your terminal type is examined the first time you attempt recognition only. .SH AUTHORS Ken Greer, HP Labs; Mike Ellis, Fairchild, added command name recognition/completion.