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

Add support for subcommands #17

Merged
merged 11 commits into from
Mar 2, 2021
Merged

Add support for subcommands #17

merged 11 commits into from
Mar 2, 2021

Conversation

cgay
Copy link
Member

@cgay cgay commented Feb 26, 2021

Docs are here.

  • Added support for subcommands
  • Added <positional-option> as a way to handle positional arguments just like pass-by-name arguments. The command line can now be fully described and the "usage" line is fully auto-generated.

See doc for details.

I must admit that at some point there were so many changes I stopped trying to keep it minimal...

The main remaining TODO is to add support for subcommands to the define command-line macro.

This error was worded as an internal error, but can actually be displayed to
the user, for example when a stray '=' appears. For example, if you typo "-ss =
val" instead of "-s = val".

Old: Unrecognized token type: {<equals-token>}
New: Unexpected token: "="
These can both be computed dynamically and there is no worry about speed in
this context.
This slot does not contain options. Certainly not in the <option> sense,
and I think not in the usaul command-line sense either.

Unfortunately this is an API change. Since the documentation is maintained
elsewhere, for now I've defined a constant with the old name.
command-line-parser.dylan Outdated Show resolved Hide resolved
@cgay cgay merged commit 014c500 into dylan-lang:master Mar 2, 2021
@cgay
Copy link
Member Author

cgay commented Apr 20, 2021

#15

cgay added a commit to cgay/command-line-parser that referenced this pull request Mar 4, 2022
cgay added a commit to cgay/command-line-parser that referenced this pull request Mar 4, 2022
fraya added a commit to fraya/command-line-parser that referenced this pull request Apr 9, 2024
Since issue dylan-lang#17 is fixed, update version of 'install-opendylan'
action and use 'dylan-tool' to build the project.
fraya added a commit to fraya/command-line-parser that referenced this pull request Apr 9, 2024
Since issue dylan-lang#17 is fixed, update version of 'install-opendylan'
action and use 'dylan-tool' to build the project.
fraya added a commit to fraya/command-line-parser that referenced this pull request Apr 9, 2024
- Add missing checkout action.

- Since issue dylan-lang#17 is fixed, update version of 'install-opendylan'
action and use 'dylan-tool' to build the project.
fraya added a commit to fraya/command-line-parser that referenced this pull request Apr 9, 2024
- Add missing checkout action.

- Since issue dylan-lang#17 is fixed, update version of 'install-opendylan'
action and use 'dylan-tool' to build the project.
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