Skip to content

Add select command#430

Merged
mtdowling merged 1 commit intomasterfrom
add-cli-select-command
May 11, 2020
Merged

Add select command#430
mtdowling merged 1 commit intomasterfrom
add-cli-select-command

Conversation

@mtdowling
Copy link
Copy Markdown
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