Eric Blake <e...@byu.net> wrote: > According to Jim Meyering on 1/10/2009 2:32 PM: >>>> "[" feels like it should be the exception. >>>> I see treating --v like --version as a feature. a typing saver. >>>> But with "[", it's good to minimize the number of strings that >>>> make it act differently. >>>> >>> >>> Or, for echo and [, we could skip parse_long_options altogether, and >>> hardcode this instead: >>> >>> argc == 2 && (STREQ (argv[1], "--help") || STREQ (argv[1], "--version")) >> >> One of those approaches would be good. >> Whichever you prefer. > > How about this patch for test/[, echo, and printf? Note that true (and > false) already did this exact approach. And for all other applications, > it makes sense to use parse_long_options (and allow abbreviations). > > I went ahead and pushed this to the next branch, to make it easier to > test. Since that branch is subject to rebasing, we can remove (or rework) > this patch as needed before making it official.
Thanks! That change looks fine. I thought about NEWS, but it's not warranted, since these are all shell built-in commands, and I suspect that only command-line users would ever use abbreviated --version and --help options with them. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils