Less verbose, more specific diagnostics on command line syntax error
Brought to you by:
glennrp
If you make any mistake invoking pngcrush, you get a generic usage message which is several screens long, contains a bunch of irrelevant information (such as the complete license text), and doesn't tell you specifically what you did wrong.
It would be nice if there were a short, tailored message for each possible command-line syntax error, e.g.
$ pngcrush foo.png pngcrush: too few command line arguments usage: pngcrush [options] infile.png outfile.png pngcrush -e ext [other options] file.png ... pngcrush -d dir/ [other options] file.png ... pngcrush -n -v file.png ... Use 'pngcrush -h' for complete usage instructions. $
Note that this doesn't even print the complete list of options, because that is already long enough, by itself, to scroll the actual error message off the top of a standard 80x25 terminal window.
The result of typing 'pngcrush' with no arguments at all could remain the same.
(Originally reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502101 )