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

Simplified subcommand term #2267

Closed

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Oct 12, 2024

Pull Request

Problem

The subcommand usage being slightly different than the command usage has always annoyed me a little. It may be a historical accident rather than by design.

In particular people who write a custom usage are surprised it does not show (#1853 #1885 #2148). But I am concerned about potential length of showing full usage by default: #1853 (comment)

Subcommand list was not showing [command] for subcommands with nested subcommands. (Missed when added nested subcommands.)

Solution

Show just the arguments (or [command] for nested subcommands). No alias. No '[options].

This makes the subcommand term clearly different that the usage, and the terms a bit shorter.

Tests skipped while thinking about approach! See first comment, as taking it further could show just the name!

ChangeLog

@shadowspawn shadowspawn added the semver: major Releasing requires a major version bump, not backwards compatible label Oct 12, 2024
@shadowspawn shadowspawn changed the base branch from release/13.x to develop October 12, 2024 23:29
@shadowspawn
Copy link
Collaborator Author

An alternative would be to show only the subcommand name for the term in the list of subcommands. This is what larger programs do, such as git, npm, docker, and hg.

To make sure people find there is more help available, the help command would be listed separately. For example git has:

See 'git help <command>' or 'git help <concept>' to read about a specific subcommand or concept.

@shadowspawn
Copy link
Collaborator Author

I opened a PR as I wanted to try changing the subcommand term and had an idea. Then I wondered about other approaches... I should make this an issue with alternatives instead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: major Releasing requires a major version bump, not backwards compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant