ls: give a more useful diagnostic for a bogus --time-style arg
commita3fee8b6afdbb70317d2124d5a3bb0d2887ab31b
authorJim Meyering <meyering@redhat.com>
Sun, 11 Dec 2011 10:59:31 +0000 (11 11:59 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 12 Dec 2011 11:19:55 +0000 (12 12:19 +0100)
treeea6ac15d733cedc9f8a201da7b65b43a87f50078
parentda4793e949363242400ad10bc739e3db4319755f
ls: give a more useful diagnostic for a bogus --time-style arg

* src/ls.c (decode_switches): Replace our use of XARGMATCH
with open-coded version so that we can give a better diagnostic.
* tests/ls/time-style-diag: New file.
* tests/Makefile.am (TESTS): Add it.
Reported by Dan Jacobson in http://bugs.gnu.org/10253
with suggestions from Eric Blake and Paul Eggert.
gnulib
src/ls.c
tests/Makefile.am
tests/ls/time-style-diag [new file with mode: 0755]