Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As an intermediate Linux user I’ve found shell to be both wondrously powerful as well as frustratingly difficult to write.

You can do so much. And the model of chaining known, stable programs together is elegant.

But it feels hard to write and maintain good code with. Even in this barchart program there’s a string of awk within this code.

So it got me wondering: is there any high quality text editor or IDE support for shell scripts? Perhaps one that even understands or looks at the inputs and outputs to other programs and understands hen you’re writing awk or sed or whatnot inside it?

And what about the concept of a higher level ergonomic language that compiles to a shell script?



There exist more modern shells like Fish Shell and Oil Shell. I haven't used them, but they're probably nicer to use than POSIX shell. I'm sure they have pipes and stuff too.


I use Fish, and can confirm that it has pipes, along with string substitution, redirection (>, >>, 2>, etc.), functions, etc.

The difference is that fish's keywords are closer to programming languages' (all blocks end with `end`, no esac nor fi), fish kind of looks like Ruby.


There is a LSP for shell: shellcheck




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: