Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Right now, it's tedious to write command chains that require stdin input. For example:
chains:
email-body:
source: !request
recipe: get-email
selector: $.headers
email-body-escaped:
source: !command
command: [sh, -c, "echo '{{chains.email-body}}' | jq -R -s '.'"]
The goal here is to reduce the number of use cases where users have to invoke the shell, without too much effort (see #153 for another example). This has two benefits:
- More user friendly
- Reduce cross-platform issues
Describe the solution you'd like
A clear and concise description of what you want to happen
A new field stdin on the !command variant:
chains:
email-body:
source: !request
recipe: get-email
selector: $.headers
email-body-escaped:
source: !command
command: [jq, -R, -s, '.']
stdin: "{{chains.email-body}}"
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered
The primary alternative is doing nothing, since this is already possible by invoking the shell directly.
Additional context
Add any other context or screenshots about the feature request here
If anyone wants to implement this, the work involved is:
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Right now, it's tedious to write command chains that require stdin input. For example:
The goal here is to reduce the number of use cases where users have to invoke the shell, without too much effort (see #153 for another example). This has two benefits:
Describe the solution you'd like
A clear and concise description of what you want to happen
A new field
stdinon the!commandvariant:Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered
The primary alternative is doing nothing, since this is already possible by invoking the shell directly.
Additional context
Add any other context or screenshots about the feature request here
If anyone wants to implement this, the work involved is:
stdinfield (typeTemplate) to ChainSource::Commandstdinvalue, then pipe that to the subprocess in render.rs