Open sereneiconoclast opened 2 years ago
Demo (using Ruby 2.7.4):
require 'thor' class MyThor < Thor default_command :go desc '', 'Do some stuff' long_desc <<~LONG_DESC Do some stuff. LONG_DESC option "verbose", desc: "verbose logging", aliases: %w(-v), type: :boolean option "debug", desc: "debug mode", type: :boolean # If this next option is commented out, the 'help' output lines them up nicely # # Options: # -v, [--verbose], [--no-verbose] # verbose logging # [--debug], [--no-debug] # debug mode # # If it is present, the indentation is uneven: # # Options: # -v, [--verbose], [--no-verbose] # verbose logging # [--debug], [--no-debug] # debug mode # -p, --post-to-gh, [--post-to-github=USERNAME] # post to a GitHub repository # # Preferred output: # # Options: # -v, [--verbose], [--no-verbose] # verbose logging # [--debug], [--no-debug] # debug mode # -p, [--post-to-gh=USERNAME], [--post-to-github=USERNAME] # post to a GitHub repository option "post-to-github", desc: "post to a GitHub repository", aliases: %w(-p --post-to-gh), banner: 'USERNAME' def go puts("Options: #{options.inspect}") end end MyThor.start(ARGV)
The options work as expected. It's only the "help go" output that has an issue.
Thanks!
Would be great to see a pull request fixing this! 😄
Demo (using Ruby 2.7.4):
The options work as expected. It's only the "help go" output that has an issue.
Thanks!