jbang
jbang copied to clipboard
`jbang edit --open=vi ...` doesn't work
Running jbang init suggested that I could run jbang edit --open=vi ... but when I do that Jbang prints out a command with sh -c vi ..... but nothing happens. If I try another editor like code it does work.
Not sure exactly what the reason is, it seems to have something to do with the way Java's ProcessBuilder does things.
A sort of workaround would be to treat console editors, like vi and emacs, differently and run them like we run Jbang scripts. But that would prevent the --live option from working (because Jbang would no longer be running).
Another option, the easiest, would be to simply remove vi and emacs from the list of suggested editors...
@quintesse Considering that jbang targets scripting ecosystems and shells, it will be useful to retain support for emacs and vim, I think. It may probably be fine not to have --live. I just ran into this when trying to edit with emacs. Thanks