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 select command #430

Merged
merged 1 commit into from
May 11, 2020
Merged

Add select command #430

merged 1 commit into from
May 11, 2020

Conversation

mtdowling
Copy link
Member

This commit adds the select command to the CLI. This command is used to
print out the shapes in a model that match a selector, including the
ability to print out a JSON document containing the shape and the
variables captured when the shape was matched.

Several commands and bits of functionality were cleaned up to make it
easier to control writing things like validation to stderr or stdout.
When using the select command, only the matched shapes or JSON output
should be written to stdout, whereas validation info should be written
to stderr.

This commit also better organizes the output of --help so that arguments
available to all commands and that aren't as important as
command-specific arguments are shown at the end of the argument list
rather than the beginning.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit adds the select command to the CLI. This command is used to
print out the shapes in a model that match a selector, including the
ability to print out a JSON document containing the shape and the
variables captured when the shape was matched.

Several commands and bits of functionality were cleaned up to make it
easier to control writing things like validation to stderr or stdout.
When using the select command, only the matched shapes or JSON output
should be written to stdout, whereas validation info should be written
to stderr.

This commit also better organizes the output of --help so that arguments
available to all commands and that aren't as important as
command-specific arguments are shown at the end of the argument list
rather than the beginning.
@mtdowling mtdowling merged commit 7ea2682 into master May 11, 2020
@kstich kstich mentioned this pull request May 13, 2020
@mtdowling mtdowling deleted the add-cli-select-command branch May 14, 2020 22:13
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