6 ms·
> Honestly, in practice, I've seen many tools that support -help also allow --help and -h for those who have the muscle memory reflex for those, so it's not nea
by tomerv 4y ago
> Honestly, in practice, I've seen many tools that support -help also allow --help and -h for those who have the muscle memory reflex for those, so it's not nearly as problematic.
$ javac --help
javac: invalid flag: --help
Usage: javac <options> <source files>
use -help for a list of possible options
:-(
- AlexanderDhoore 4y agoUsing double -- for long named flags is a GNU-ism. Java came from Sun and so prefers the single dashes.
- oneeyedpigeon 4y agoBut "-help" is just "-h -e -l -p" ...
- VWWHFSfQ 4y agoWhich is also a gnuism
- oneeyedpigeon 4y agoThat's my point - "-help" violates the gnu standard.
- anjbe 4y ago“-help” being equivalent to “-h -e -l -p” is not a GNUism. It’s described by POSIX. If a utility takes the options “-a” and “-o something” and uses POSIX getopt(), then these are all equivalent: cmd -ao arg path path cmd -a -o arg path path cmd -o arg -a path path cmd -a -o arg -- path path cmd -a -oarg path path cmd -aoarg path path
- dcminter 4y agoA long time ago I filed a bug with Sun about inconsistent flags on the JDK tooling. As I recall it they fixed the sole specific example that I cited instead of reviewing them all...
- dcminter 4y agoOoh, I think this might have been the one (at least the mention of rmi and MS style paths would be consistent with what I recall working on at the time): https://bugs.java.com/bugdatabase/view_bug.do?bug_id=5083924 https://bugs.java.com/bugdatabase/view_bug.do?bug_id=5083924