Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 8. csh and tcsh > Command-Line Manipulation - Pg. 527

Special Aliases in tcsh Certain special aliases can be set in tcsh. The aliases are initially undefined. Once set, they are executed when specific events occur. The following is a list of the special aliases: beepcmd At beep. cwdcmd When the current working directory changes. periodic Every few minutes. The exact amount of time is set by the tperiod shell variable. precmd Before printing a new prompt. shell shell If a script does not specify a shell, interpret it with shell, which should be a full pathname. Command-Line Manipulation csh and tcsh offer a certain amount of functionality in manipulating the command line. Both shells offer word or command completion, and tcsh allows you to edit a command line. Completion Both tcsh and csh provide word completion. tcsh automatically completes words and commands when the Tab key is hit; csh does so only when the filec variable is set, after the Esc key is hit. If the completion is ambiguous (i.e., more than one file matches the provided string), the shell completes as much as possible and beeps to notify you that the completion is not finished. You may request a list of possible completions with Ctrl-D. tcsh also notifies you when a completion is finished by appending a space to complete filenames or commands and a / to complete direc- tories. Both csh and tcsh recognize ~ notation for home directories. The shells assume that words at the beginning of a line and subsequent to |, &, ;, ||, or && are commands and modify their search paths appropriately. Completion can be done midword; only the letters to the left of the prompt are checked for completion. csh and tcsh Related Shell Variables · autolist · fignore Command-Line Manipulation | 527