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

consider using System.CommandLine #193

Open
AndyAyersMS opened this issue Feb 1, 2019 · 1 comment
Open

consider using System.CommandLine #193

AndyAyersMS opened this issue Feb 1, 2019 · 1 comment
Assignees

Comments

@AndyAyersMS
Copy link
Member

https://github.com/dotnet/command-line-api

Seems better than the random experimental package we're using now. But not sure if it can handle dispatch-style commands (where the allowed/recognized set of trailing options depends on an initial command verb).

We could start by using this for the subcommands that don't do dispatching -- in particular fix up the hacky pmi command parsing.

AndyAyersMS added a commit to AndyAyersMS/jitutils that referenced this issue May 24, 2019
Replace PMI's home-grown command line parsing with the new System.CommandLine
version.

Syntax changes slightly as the "suffix" options (eg `PREPALL-QUIET`) now need
to be separated out (`PREPALL --quiet`). Only real "breaking" change is that the
method index for `PREPALL` and `PREPONE` is now a named option.

With this new package we get built in help and (in some shells) command line
completion.

I plan to eventually migrate all the utilites over to this package as the one
they are using is now orphaned and unsupported. See dotnet#193.
@AndyAyersMS
Copy link
Member Author

Might be simpler to first move our tools to using https://github.com/natemcmaster/CommandLineUtils, this would decouple us from the System.CommandLine namespace so we could then migrate to the above incrementally, as needed.

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

2 participants