-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Proposal: sh("<cmd> ...") as alias for sh.bash("-c", "<cmd> ...") #735
Comments
Is the request something like this? from sh.contrib import bash
bash.ls() # runs bash -c ls |
Thank you for your prompt reply! Yes exactly, the only extra I would add is being able to call directly - e.g: from sh.contrib import bash
bash("command-with-dash [...]") # runs bash -c <cmd> [...] directly |
Ok, I would merge it if you (or someone) made a PR. Here's the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using sh extensively I often find myself having to use the
sh.bash("-c", "<cmd> ...")
. Although thesh.<cmd>
interface is great initially for convenience, I often find myself adding the full command directly, whether for easier consistency when testing or due to limitations such as commands that contain a special character (-
,.
, etc). Indeed it's possible tobash = sh.bash.bake("-c")
which is what I tend to do instead, but it would be quite convenient if this was supported by default as a contrib command that is accessible directly from the callable interface, and could potentially be a relatively simple interface (e.g. a__call__
implementation). Thanks for the great project!The text was updated successfully, but these errors were encountered: