Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll: how commands are listed in Help #2268

Open
shadowspawn opened this issue Oct 13, 2024 · 4 comments
Open

Poll: how commands are listed in Help #2268

shadowspawn opened this issue Oct 13, 2024 · 4 comments

Comments

@shadowspawn
Copy link
Collaborator

shadowspawn commented Oct 13, 2024

The list of subcommands in the help uses a format similar to the full "usage", but does not use author supplied custom usage which is arguably a bug. However, a custom usage string could be quite long if it includes all of the available options so I am hesitant to make that the default.

I am wondering about changing the way commands are listed by default and interested in feedback.

For reference in the examples below, the full usage for each command is:

Usage: fab clone [options] <source> [destination]
Usage: fab for-each|forEach [options] <command> [args...]
Usage: fab completion [options]
Usage: fab custom <command> -- [options]

You may vote 👍 for more than one, and may vote 👎 against any you dislike.

@shadowspawn
Copy link
Collaborator Author

  1. legacy

This is the existing approach. The [options] is suppressed if there is only --help.

Commands:
  clone [options] <source> [destination]          clone source and install its dependencies
  for-each|forEach [options] <command> [args...]  run specified command on each repo in the forest
  completion                                      (has no options other than --help)
  custom [options] <command>                      command with custom usage string
  help [command]                                  display help for command

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Oct 13, 2024

  1. name only

A name-only listing is often used by utilities with lots of commands like git, npm, docker, and hg.

Commands:
  clone       clone source and install its dependencies
  for-each    run specified command on each repo in the forest
  completion  (has no options other than --help)
  custom      command with custom usage string
  
  To see the help for a command use 'foo help <command>`.

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Oct 13, 2024

  1. full usage

In particular, this includes any author supplied custom usage strings.

Commands:
  clone [options] <source> [destination]          clone source and install its dependencies
  for-each|forEach [options] <command> [args...]  run specified command on each repo in the forest
  completion [options]                            (has no options other than --help)
  custom <command> -- [options]                   command with custom usage string
  help [command]                                  display help for command

@shadowspawn
Copy link
Collaborator Author

  1. name and arguments
Commands:
  clone <source> [destination]  clone source and install its dependencies
  for-each <command> [args...]  run specified command on each repo in the forest
  completion                    (has no options other than --help)
  custom <command>              command with custom usage string
  help [command]                display help for command

@shadowspawn shadowspawn pinned this issue Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant