As far as I see the command-line parser of the redhat implementation, alternatives doesn't fix the orderings of the command-line options. In addition, there are extensions --family <1 arg>, --initscript <1 arg>, and --follower <3 args>. The orderings in the man page must be only for presentation.
We should explicitly see the nearest option name to generate the command line arguments.
Originally posted by @akinomyoga in #1639 (comment)
Code context was
*)
case $((args % 4)) in
0 | 2)
_comp_compgen_filedir
;;
1)
_comp_compgen -- -W '--slave'
;;
3)
_comp_cmd_alternatives__installed
;;
As far as I see the command-line parser of the redhat implementation,
alternativesdoesn't fix the orderings of the command-line options. In addition, there are extensions--family <1 arg>,--initscript <1 arg>, and--follower <3 args>. The orderings in the man page must be only for presentation.We should explicitly see the nearest option name to generate the command line arguments.
Originally posted by @akinomyoga in #1639 (comment)
Code context was