1

I want to construct a program utility synopsis for optional comma separated keywords.

utility [KEYWORD[,KEYWORD]...]

I worder where I should put the repeating pattern ....

I want to allow the following usage

utility
utility keyword
utility keyword,keyword
utility keyword,keyword,keyword 
and so on
Vera
  • 1,223

1 Answers1

0

I think the style you're proposing is very clear and you should use it.

The documentation of allowable arguments isn't well-specified anywhere, it builds on conventions, and I'd argue that your solution fits these conventions relatively well.

For comparison, the useradd man page uses

-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]

and I think that is actively more confusing than what you are doing! So stick with yours.