On Sat, Jan 09, 2021 at 02:07:32PM +0100, Christian Weisgerber wrote: > Edgar Pettijohn: > > > In the BUGS section for the getopt(3) manual it mentions not using > > single digits for options. I know spamd uses -4 and -6 there are > > probably others. Should they be changed? Or is the manual mistaken? > > You misunderstand. The manual warns against the use of digits to > pass numerical arguments. This usage exists in some historical > cases, e.g. "nice -10" where <10> is the number 10. > > The use of digits as flags characters, like -4 or -6 to indicate > IPv4 or IPv6, is perfectly fine.
If you want to change this, it seems best to point to existing good and bad examples. Good: - using digits as flags, e.g. for IPv4 vs IPv6 support Bad: - using digits as numbers, e.g. nice(1), tail(1) historic use. Recommendation to avoid bad use: -n <arg> Joerg