-
Notifications
You must be signed in to change notification settings - Fork 128
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 deck file echo --selector=...
command
#1325
Comments
how about
what's the use of the |
I missed that the output options should include text only (non-structured values) for selecting down to a single value to pass into subsequent commands or variables. Maybe that can be automatic based on the selector results. It's similar to bash I'm indifferent on the |
That makes sense. A selector always returns an array. So individual values to be returned needs some extra flags to specify then. if a selector returns: [
"hello"
] How would the command know to output Adding a flag |
Thank you, I had forgotten this was the behavior even for the scalar return values. Considering the options... |
Various commands in the
deck file
subcategory use JSON Path selectors to apply transformations to declarative files in a pipeline. This issue raises a proposal to add a command that will return a value from a selector onSTDOUT
. This command can be useful in a few scenarios:--value
parameter in a subsequent command.Suggested syntax:
print
orecho
verbs could be chosen.-n
will append a new line to the returned value, otherwise no newline character is addedThe command should fail (return non-zero exit code) if the selector returns no value so that users can easily determine empty values vs "missed selectors" as well as break pipelines if queries fail.
The text was updated successfully, but these errors were encountered: