Why Sponsor Oils? | blog | oilshell.org

Please Try the First OSH Release

2017-07-23

OSH is a bash-compatible shell. Here is the tarball:

and instructions:

For this first release, I mainly want to know if people are able to build it, install it, and then run a "hello world" program.

My intent is that it works on any Linux distribution. I've tested it on Ubuntu 16.04 and Alpine Linux 3.6.2 on an x86-64 machine.

There may be issues on non-x86 platforms due to the way I rewrote the CPython build system, and I'd like to fix these bugs ASAP. If there's another operating system or platform you'd like it to work on, leave a comment.

Caveats

What Should I Try?

The INSTALL file gives a couple suggestions: echo hi and osh -n configure.

The -n flag is the same as set -o noexec. In most shells, it checks for syntax errors in the "command sublanguage". Roughly speaking, this means it does a shallow parse of the top level of the script.

OSH parses shell up front in a single pass, so it's able to find more syntax errors. It will also pretty print the AST, to show you that it worked.

Your Own Programs

I've tested OSH on many of my own programs, and one large program found in the wild. But different people use different parts of the language, so I'd like to hear what errors you encounter when running osh myscript.sh. Again, file a bug or leave a comment.

For example, right now I'm working on another shell script that fails because ${myvar/pat/replace} isn't yet implemented in OSH.

On the other hand, if you run a script successfully, let me know!

What is Implemented?

I've started the OSH Quick Reference to answer this question. The table of contents lists every part of the shell in a compact format. The red X symbols show roughly what isn't implemented.

Most language constructs are implemented, but many builtins aren't. I'd like to fill these out based on real usage (e.g. see How I Use Tests).

Here are stats for the spec tests as of this release:

Next

What happens next depends on the feedback I get! There are two main dimensions to the work:

I may also adapt OSH to be a programming aid for bash. That is, it could be a stricter subset of bash that gives you better error messages.

I want OSH to be useful while I'm optimizing and polishing it. If this sounds interesting to you, leave a comment.