1. 10

  2. 4

    I don’t have an account on Zulip nor on IRC. What is “!qefs” problem, as no search engine reveals it?

    1. 8

      "$Quote" "$Every" "$Fucking" "$Substitution"

      1. 1

        FWIW Googling “qefs bash” shows a bunch of references. I thought it was funny the first time I saw it … If I think back to 15 years ago when I first wrote bash, I think a code reviewer told me the same thing, haha.

      2. 1

        Thanks for posting this. I was initially disappointed when I learned that Oil would be a superset rather than a translation target for OSH, but after reading these notes it makes a lot more sense. I’m really looking forward to seeing where this goes, and wish I had time to contribute.

        Minor usage nitpick: when you say “reign in complexity”, you really mean “rein”. It’s a horse rather than a kingship metaphor. Funny how languages evolve!

        1. 1

          OK, I’m glad it makes sense! I’m surprised more people haven’t pushed back on this, but I guess I explained it in many different ways.

          I welcome constructive feedback if you don’t have time to contribute. Feedback from experienced shell programmers is most immediately useful, but also from programmers who don’t know shell. Oil is also aimed at people who know say Python or JavaScript, but purposely avoid shell (which appears to be a pretty large group of people).

          Thanks for noticing the typo! Fixed :)

          1. 2

            Oil is also aimed at people who know say Python or JavaScript, but purposely avoid shell

            I’m one of those people! I didn’t realize I was in the target group for Oil until now :)

            1. 2

              Yes I just changed the definition of Oil to make this more clear:

              It’s parsed and evaluated like Python or Javascript, as opposed to being a “macro processor”.


              The shopt -s simple-word-eval algorithm gets rid of “word expansion” and makes it a much simpler “word evaluation”:


              I could also use feedback on these array rewrites from Python/JavaScript programmers. I think you will find the Oil version more readable than bash for sure.


              It may be less familiar than Python or JS, but on the other hand you will gain a lot of shell idioms that you can’t do in Python or JS. (This may or may not matter depending on the problem)

              The main difference is that Oil retains the bare words syntax for typability. And it has pipelines, && for sequencing, etc. Otherwise, it has Python-like data structures (still in progress), which is natural because it’s implemented in Python!

              More background: How to Parse Shell Like a Programming Language