4 ms·
I am very sympathetic to this. I like the concept of a shell (there's a place for light scripting that doesn't involve python or perl or ruby), and appreciate w
by abnry 6y ago
I am very sympathetic to this. I like the concept of a shell (there's a place for light scripting that doesn't involve python or perl or ruby), and appreciate what bash can do, but after encountering enough of the "gotchas" and just ugly behavior, I'm not really motivated to master it. The biggest reason to learn it seems to be the fact that everybody uses it and has done so for years.
We need something akin to Jupyter notebooks for unix.
- chubot 6y agoYes, I would like for that to happen: Shell as an engine for TUI or GUI https://github.com/oilshell/oil/issues/738 https://github.com/oilshell/oil/issues/738 C++ code should be embeddable in another program https://github.com/oilshell/oil/issues/822 https://github.com/oilshell/oil/issues/822 I think you can already use bash in Jupyter, but the integration is necessarily kind of coarse. I don't know exactly what a good integration is, but I'm looking for people interested in UIs to help me figure it out. At the very least, you can use Oil's parser to provide completions: http://www.oilshell.org/blog/tags.html?tag=interactive-shell#interactive-shell http://www.oilshell.org/blog/tags.html?tag=interactive-shell... (which is a separate integration point that running commands) Also, I mentioned in the blog post that there's some interest from maintainers in combining the fish shell and Oil. However someone has to do that work, and there's a lot of it! https://github.com/oilshell/oil/wiki/Where-To-Send-Feedback https://github.com/oilshell/oil/wiki/Where-To-Send-Feedback ---- Also, I use shell scripts as a productivity tool like a Jupyter notebook: http://www.oilshell.org/blog/2020/02/good-parts-sketch.html#semi-automation-with-runsh-scripts http://www.oilshell.org/blog/2020/02/good-parts-sketch.html#... I think we need to come up with a clever name for it -- some people call it "Taskfile", "go script", and I call it "run.sh". The basic idea is that I don't remember how to do things with computers, because there are too many things to do. I just remember WHERE I WROTE IT DOWN in a shell script. Some people write their notes in text files; I write them in executable shell scripts.
- viraptor 6y ago> I don't know exactly what a good integration is, but I'm looking for people interested in UIs to help me figure it out. Ignoring the language bit, in write impressed with both AutoIT and PowerShell GUI integration. They really allow you to create script-like utilities.
- Splognosticus 6y agoI haven't tried it personally, but there is a notebook-style terminal that might interest you, aptly-named Shell Notebook. https://shellnotebook.com/ https://shellnotebook.com/
- onlyrealcuzzo 6y agoThe biggest reason to master the shell (I think) is that if you will discover a shocking amount of things you can quickly accomplish piping between the standard Unix binaries (essentially the standard library).
- PurpleFoxy 6y agoIMO as soon as you feel the need to create a file for your shell commands, it’s time to use another language. Bash is great for quick jobs like running ffmpeg on every file in a folder or counting the lines in a file but it sucks as a programming language.
- edgyquant 6y agoIt sucks as a programming language because it’s a shell. No I’ve written rather large scripts that were robust but had no need to be written in a programming language. If your gluing programs together shell script are literally designed for that. If you’re doing lots of arithmetic and huge amounts of variable logic then, yes, you should switch to a programming language. Each tool has its place but I’ve seen people with this attitude spend a day writing a program in python to solve a problem we could do with a couple of shell functions in half an hour.
- onlyrealcuzzo 6y ago^ and the Python script likely has many more bugs. One of the best things about gluing together battle tested Unix programs is that you'll only have bugs in your glue, not in the tricky logic that's more error prone.