[Chapter 9] 9.10 Filename Completion Isn't Always the Answer
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:35:02Z

#

| Chapter 9 Saving Time on the Command Line |

## 9.10 Filename Completion Isn't Always the Answer

There are a number of times when filename completion (9.8, 11.13) isn't appropriate:

- If you want to list many files on the command line, it may be easier to use a carefully constructed wildcard (1.16) expression.

- As we mentioned earlier, filename completion and wildcards don't mix. If you need to use a wildcard, you can't use filename completion. For example, you might want to match a filename by the end of its name; if you have lots of files starting with a but only one of those filenames ends with .c, it's probably easier to type `*.c` or `a*.c` than to use filename completion.

- Filename completion is obviously less worthwhile if you have to type most of the filename before you can use it. For example, if you have a lot of files with similar names, filename completion won't help an awful lot. (This may say something about the way you name files - the remedy might be to think up some more distinctive names.)

- ML, JP

9.9 Don't Match Useless Files in Filename Completion |  | 9.11 Repeating a Command with a foreach Loop