Closed jnoortheen closed 3 years ago
Hi @jnoortheen!
Yes you can do bash -c! ls
to run the another shell command.
But there are two issues around this approach:
bash -c! for i in 1 2 3
do
echo $i
done
# Syntax error
But in xontrib-sh:
! for i in 1 2 3
do
echo $i
done
2. You should write `bash -c!` command that has more keystrokes than just `! ` :)
Meanwhile I think it's a good potential feature for xontrib-sh: to allow run the script with certain shell i.e. `zsh! ls`.
PRs are welcome!
> I just stumbled across this package
Look at [xontrib-ergopack](https://github.com/anki-code/xontrib-ergopack) also ;)
Yes thanks, I got here after checking out the ergopack. I currently don't have use for shell specific snippets, so a PR wouldn't be possible. Just wanted to see how this can be handled.
I just stumbled across this package. I don't know if this is possible. But here is an idea of using subprocess macros to identify the shell language.
So something like
would become possible.