Skip to content

Multi-level subcommands #23

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

Merged
merged 1 commit into from
Dec 28, 2021
Merged

Multi-level subcommands #23

merged 1 commit into from
Dec 28, 2021

Conversation

cgay
Copy link
Member

@cgay cgay commented Jul 19, 2021

Motivating use case:

   dylan new library --type exe my-lib
   dylan new workspace ...

In programs with a fairly large set of subcommands this just reduces
the top-level clutter and need to stuff everything into a top-level
command by adding hyphens or what-have-you.

By default subcommands support the --help option and there is also
a top-level help subcommand that accepts any (multi-level) subcommand
for which it displays help. For example,

  dylan new --help
  dylan help new workspace

Motivating use case:

  dylan new library --type exe my-lib
  dylan new workspace ...

In programs with a fairly large set of subcommands this just reduces
the top-level clutter and need to stuff everything into a top-level
command by adding hyphens or what-have-you.

By default subcommands support the `--help` option and there is also
a top-level `help` subcommand that accepts any (multi-level) subcommand
for which it displays help. For example,

  dylan new --help
  dylan help new workspace
@cgay cgay merged commit 9de50be into dylan-lang:master Dec 28, 2021
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

Successfully merging this pull request may close these issues.

2 participants