Navigation Menu

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

args: ability to specify 'help' for commands #15247

Closed
DartBot opened this issue Nov 21, 2013 · 3 comments
Closed

args: ability to specify 'help' for commands #15247

DartBot opened this issue Nov 21, 2013 · 3 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Nov 21, 2013

This issue was originally filed by @seaneagan


If we can add commands to a parser, we ought to be able to add 'help' text for those commands (as with options and flags), and get it back out in a nice format.

    parser.addCommand(... help: ...);

    print(parser.commandUsage);

Which might output something like:

start Starts the service
stop Stops the service
restart Restarts the service

The help text could be accessible via a field in the command's ArgParser:

    parser.commands['foo'].help

and this field could be reused to store a description of the overall script:

    parser.help

(or possibly s/help/description)

@iposva-google
Copy link
Contributor

Added Area-Pkg, Library-Args, Triaged labels.

@anders-sandholm
Copy link
Contributor

Removed Library-Args label.
Added Pkg-Args label.

@DartBot DartBot added Type-Defect area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Feb 6, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/args#24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

4 participants