Initial outline for Windows powershell support. #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"This implementation creates a new shell each execution, which is not ideal. TODO: figure out how to change shell once permanently (or does it always create a new shell?). TODO: Sanitize quotes for powershell as per in-code comment."
Hi, this is a first shot at adding powershell support as well as multi-shell support. Not mentioned in the comment is I changed it to use a home directory rather than /tmp for security reasons. The override is the set_temp function.
This is largely untested ("ls ~" worked!), but I thought I'd create a pull to get comments on an initial change. It's much more utilitarian than your code. I couldn't call commands through the meta mechanism to get the temp file set up (because there's no temp file!) so I used my existing library to bootstrap.
Also, while debugging I noted it went into the chuck to use the filepipe because args.input was "" (blank) not nil so I added a check for that.
It's late, probably missed details. Talk soon.
Russ
p.s. I have no interest in adding cmd support. :-P