-
-
Notifications
You must be signed in to change notification settings - Fork 162
OSH versus Oil
andychu edited this page Nov 21, 2021
·
27 revisions
Here is a short guide:
-
bin/osh
runs the OSH language, which is extremely compatible with POSIX shell and bash. It's designed to run existing scripts. -
bin/oil
runs the Oil language, a new shell language that's designed to be familiar to Python and JavaScript users. You can gracefully upgrade your shell scripts to it, or write brand new scripts in it.
But they actually run in the same binary and use the same parser and interpreter! bin/osh
and bin/oil
are symlinks.
There are many global shell options like shopt --set parse_brace
that change OSH into Oil. Running bin/oil
is equivalent to running bin/osh
with the option group shopt --set oil:all
.
(As of 11/2021, OSH is a lot more mature than Oil.)
For examples of the syntax, see The Simplest Explanation of Oil.