rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.11k stars 552 forks source link

Update output for help text formatting to not use '=' #773

Closed s2k closed 1 year ago

s2k commented 2 years ago

🌈 (Not a pull request, but still)

Current Behaviour

Thor apps, such as rails display options that come with an argument with an equals sign. In the example below, that's [--ruby=PATH]

> rails help new
Usage:
  rails new APP_PATH [options]

Options:
…
  -r, [--ruby=PATH]               # Path to the Ruby binary of your choice

Suggested Change

Use a space instead of the '=' in the help output, like this

  -r, [--ruby PATH]               # Path to the Ruby binary of your choice

Rationale

It seems to be common practice to not use the '=' sign, neither in practical usage, nor documentation.

Examples:

Note

I'd be happy to work on & provide a corresponding PR, should I get the specs to pass.

dorner commented 2 years ago

I think it depends on the tool. This Stackoverflow, for example, indicates that both styles are used in various contexts: https://unix.stackexchange.com/questions/573377/do-command-line-options-take-an-equals-sign-between-option-name-and-value