-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hi, thanks for creating shpool. This is more of a feedback ticket rather than a bug report, so feel free to close it.
What happened
I was surprised by the unusual behavior of the -c flag.
What I expected to happen
Usually, programs which accept another command to run do it in one of two ways:
- A program name and a list of arguments. For example,
dockerandenvwork in this way. - A single string which is then passed to a shell's
-cargument. Shells andsshwork in this way.
shpool does neither: it accepts a single string, but then only does one subset of the usual parsing that a shell would do. So, for example, ~ does not expand to $HOME, variables aren't expanded, and and piping / redirection doesn't work.
Since it's using a -c switch, I think the path of least surprise would be to do the equivalent of execv("/bin/sh", "-c", ...arguments...);.
To Reproduce
Steps to reproduce the behavior:
I think this is reproducible with something like shpool -c '~/bin/my_script'.
Version info
shpool 0.8.0
Logs
N/A