Open danieldaeschle opened 4 years ago
This one has been hanging around a long time. I think it can simply be closed, if there are no big objections.
The fact is that there are 2 conventions, the GNU convention (short flags with -
, long ones with --
, combine short ones is OK), and the POSIX convention (only -
regardless of flag length, no combining).
The GNU convention is, indeed, used in many programs. However, the POSIX convention is also used in others, and is just as valid. V currently uses the POSIX convention.
Also, the current flag
module has been updated so you can choose which style you want to use.
Currently we have
-cg
,-keepc
and things like-prod
. The common pattern is to have--prod
(double-
for longer flags) and-g
(single-
for only one char).-cg
would be the shorthand for-c -g
. Then-cg
flag must be used with--cg
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html http://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html