16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and typed mail -f c.l.c[tab], it would be completed to mail -f comp.lang.c, and ^D<br />

would list comp.lang.c and comp.lang.c++. mail -f c..c++[^D] would list<br />

comp.lang.c++ and comp.std.c++. Typing rm a--file[^D] in the following directory<br />

A_silly_file a-hyphenated-file another_silly_file<br />

would list all three files, because case is ignored and hyphens and underscores are<br />

equivalent. Periods, however, are not equivalent to hyphens or underscores.<br />

Completion and listing are affected by several other tcsh shell variables: recexact<br />

can be set to complete on the shortest possible unique match, even if more typing<br />

might result in a longer match. For example:<br />

> ls<br />

fodder foo food foonly<br />

> set recexact<br />

> rm fo[tab]<br />

just beeps, because ’fo’ could expand to ’fod’ or ’foo’, but if we type another ’o’,<br />

> rm foo[tab]<br />

> rm foo<br />

the completion completes on ’foo’, even though ’food’ and ’foonly’ also match.<br />

autoexpand can be set to run the expand-history editor command before each<br />

completion attempt, and correct can be set to complete commands automatically<br />

after one hits ’return’. matchbeep can be set to make completion beep or not beep<br />

in a variety of situations, and nobeep can be set to never beep at all. nostat can<br />

be set to a list of directories and/or patterns which match directories to prevent the<br />

completion mechanism from stat(2)ing those directories.<br />

Note: The completion operation succeeds, but faster. The setting of nostat is<br />

evident when using the listflags variable. For example:<br />

>set listflags=x<br />

>ls-F /u/pluto<br />

Dir1/exe1*<br />

>set nostat=(/u/pluto/)<br />

>ls-F /u/pluto<br />

Dir1exe1<br />

><br />

Although, you must be careful when setting nostat to keep the trailing /<br />

(forward slash).<br />

listmax and listmaxrows can be set to limit the number of items and rows<br />

(respectively) that are listed without asking first. recognize_only_executables can<br />

be set to make the shell list only executables when listing commands, but it is quite<br />

slow.<br />

Finally, the complete built-in command can be used to tell the shell how to<br />

complete words other than filenames, commands and variables. Completion and<br />

listing do not work on glob-patterns (see “Filename substitution” on page 643), but<br />

the list-glob and expand-glob editor commands perform equivalent functions for<br />

glob-patterns.<br />

Spelling correction<br />

The tcsh shell can sometimes correct the spelling of filenames, commands and<br />

variable names as well as completing and listing them.<br />

tcsh<br />

Individual words can be spelling-corrected with the spell-word editor command<br />

(usually bound to M-s and M-S where M = Meta Key or escape (ESC) key) and the<br />

Chapter 2. Shell command descriptions 631

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!