4 ms·
If you don't mind using python, the sh package [0] can really get you a bash-style repl (dinamically) typed. .. [0]: http://amoffat.github.io/sh/ http://amoffa
by _ZeD_ 11y ago
If you don't mind using python, the sh package [0] can really get you a bash-style repl (dinamically) typed.
.. [0]: http://amoffat.github.io/sh/ http://amoffat.github.io/sh/
- loevborg 11y agoYes, in my mind this is the way to go (the other alternative, probably unviable, being scsh https://github.com/scheme/scsh https://github.com/scheme/scsh). I recently made a decision not to write any bash scripts that include a conditional or loop; for all those use cases python+sh is the way to go. The reason: http://mywiki.wooledge.org/BashPitfalls http://mywiki.wooledge.org/BashPitfalls I can't think of any environment where python would not be available. You can even ship sh.py as a single-file dependency along with your script, so `import cp from sh` will work as expected.
- Johnny_Brahms 11y agoHaha! Just reading this thread I got the idea to replace bash with something scheme-like. You have a shell which works like it usually soes, but that easily let's you write any utilities in scheme. I use scheme to write most of my system stuff (most revently a custom automounter for my raspberry Pi) and thought it would have been a nice project. You could probably go macro galore and make it quite comfortable to do piping and integrate the regular system utilities in the language.
- kseistrup 11y agoThere's also a bash-like Python REPL like Xonsh ⌘ http://xonsh.org/ http://xonsh.org/ Still in early development, but very useful.