Shellcheck is an impressive project – it does a pretty complete parse using Haskell’s Parsec parser combinator library.

Although in some sense it was a negative inspiration for Oil [1]. Someone integrated it with the code review system at Google, and mostly what it would tell me to is to quote every variable substitution [2]. I would get an error on every line.

This is technically correct, but I also thought it was dumb to put so much effort into working around the problems of a crappy language. It would be a lot easier if the language didn’t have this bad behavior in the first place.

So that is one design principle for the Oil language: no confusion between strings and arrays of strings [3].

Yes I encountered rc several years ago, and re-read the paper as I started work on Oil. It’s on my list of shells [1], along with the similar es shell.

I’ve also looked at the code, but I don’t think I’ve run any scripts with it. I remember it didn’t have word splitting, which is good. It seems like a smaller, cleaned-up POSIX sh, which is good. But it’s also incompatible, which is probably why it wasn’t adopted widely.

If there’s anything in particular about the rc shell you think would be good in a modern shell like Oil, I’m interested.

I haven’t used rc heavily myself, but the thing I find most appealing is the idea of not having to worry about quoting-induced catastrophes in shell-scripts.

I’m sure you’ve already got a plan for this, but if “array of strings” is your basic data-type, I hope Oil will make it easy to plumb between the various uses of that structure in shell programming, including arguments given to a command, arguments received from a caller, the results of a find(1) (both \n-delimited and \0-delimited), the inputs to an xargs(1), etc.

Yes definitely! You will like Oil if I manage to finish it. Help is appreciated. :)

Though I should mention the functionality of find will likely be builtin. As I mentioned here[1], it’s really an expression language in the style of the [ and [[ language, and the !-a-o\( syntax is an ugly hack.

But of course you could still call out to the external GNU find if you want.

There’s also an argument for xargs and xargs -P in particular being part of the shell. In fact the GNU bash manual refers to GNU parallel [2].

A shell is a thing that starts processes, and some things get lost if you delegate that task to an external xargs (tracing, stats, time, exit code, etc.)