Hacker News new | ask | show | jobs
by parentheses 469 days ago
I feel that raw code is simpler to work with, more flexible and more ubiquitous (at least for bash).
3 comments

As I was developing Shef, I kept asking myself if just knocking out a bash script was easier than making a recipe in yaml. In a lot of ways, absolutely. But I kept coming back to the embedded user prompts and a few of the other features that add some nice benefits on top of bash scripting. But all in all, you raise valid points.
Could you provide those nice features like colors and interactive prompts as a library of shell functions that do work in bash?
META: Why are this guy's posts insta-dead? Is this because he registered and started "spamming" immediately (responding in this discussion)?
Might be an algo thing, might be a trigger happy "enhanced" user that doesn't like green accounts.

FWiW the comments look fine to me and I've just [vouch]'d each and every one .. if some one else or two does the same they should come back.

I appreciate it! I saw that was happening so I stopped replying. Long time listener, first time caller
I agree with this statement. The world is absolutely chock full of weird control flow constructs layered on top of YAML. When I opened this repo and saw it was YAML driven I just rolled my eyes.

With just a little bit of effort, shell scripting really isn’t that arcane.

>With just a little bit of effort, shell scripting really isn’t that arcane.

It isn't, but at least bash and posix shell don't really have scoping, structured variables, or reliable error handling (too many ways an error code can be invisibly dropped)

To get them, you need to use a less used shell like hush or powershell. And one reason those haven't taken over, is that if you have to add a dependency you might as well use a full language anyway. But I agree that YAML isn't a good option for scripting either

Yeah exactly, Python if you need all those features for safety. If portability is more important to you, maybe it’s OK to put up with the weird quirks of bash.
Especially when this thing doesn't even seem to give any tractability benefits.