Add "ls --hide".
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Sep 2004 22:56:38 +0000 (22:56 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Sep 2004 22:56:38 +0000 (22:56 +0000)
commit92b1470e88cb69d8f50235b79f87fab5ac44c2cb
tree477b3686f8e7dff53587829f87bd31c9ce440ce5
parentb7cffb8c5e9be5f1b1295449180285686430a93c
Add "ls --hide".
(file_ignored): Renamed from file_interesting, with
inverted return value.  Accept the file name, not a struct dirent *.
All uses changed.  Avoid the expense of calling fnmatch if the
file is ignorable due to leading '.'.
(all_files, really_all_files): Removed; replaced by:
(ignore): New variable.  All uses changed.
(IGNORE_DEFAULT, IGNORE_DOT_AND_DOTDOT, IGNORE_MINIMAL, HIDE_OPTION):
New constants.
(hide_patterns): New variable.
(long_options, decode_switches, file_ignored, usage):
Add support for --hide.
(patterns_match): New function.
(usage): Replace "hide" with "ignore" in explanation, to avoid
confusion.
src/ls.c