作者:袁沮战_246 | 来源:互联网 | 2023-06-22 19:05
I would like to propose switching the verb form used in the examples, but especially in the default help messages, to using the infinitive or imperative form. For example, ‘prints’ would become ‘print’.
The verb used in the default help messages such as ‘Prints version information’ clashes with the form I use in my help messages, for example ‘Suppress header rewriting’. Looking at a couple of CLI’s I’ve used most recently on my machine (cargo, rustup, git, rsync, grep, vim, emacs), I’m beginning to believe that the infinitive form, without the third person singular suffix -s, is preferable.
I do myself use the finite form when writing API documentation for functions (‘Prints version information’, read: ‘[this method] prints version information’), but I think options and flags are different. Options and flags change how a program does something or what a program does, they don’t themselves ‘do’ something like a function does.
Anyway, I don’t want to make a linguistic argument here, instead I want to argue for good defaults, and in this case, looking at existing CLI’s, in my opinion the infinitive verb form would be a better default.
Thank you for your consideration!
该提问来源于开源项目:clap-rs/clap
You can override this messages with
and
respectively. I think this resolves the issue, feel free to reopen.