jawher / mow.cli

A versatile library for building CLI applications in Go
MIT License
871 stars 55 forks source link

Hide the default value of version in help output #26

Closed bmoyles closed 8 years ago

bmoyles commented 8 years ago

Minor fix: rather than display

Options:
  --version=false   Show the version and exit

leave off the default value

Options:
  --version    Show the version and exit

Anecdotally (I don't have data to back this up, unfortunately), bool options by convention are assumed false if not specified on the command line and are true if present. If one wants a bool that defaults to true and is toggled false via an option, the conventions I've seen most often are "--no-option" or "--without-option." I do like the option of being explicit and showing the default true/false if the situation or interface makes sense, but prefer "--option" to imply false by default and true if present and "--no-option" to imply true by default, false if not present. Do you agree and is this something you'd be interested in a PR for?

jawher commented 8 years ago

Thanks for the PR @bmoyles, I quite like it and I do agree the help message looks cleaner this way !

Since I'm going to merge this PR, I suggest we continue this discussion in a new issue.