Oil Shell 0.8.9 Is Released

From LinuxReviews
Jump to navigationJump to search
Konsole.svg

Oil Shell is a not-really drop-in replacement for Bash with its own programming language for "serious" shell programming. The latest release has some very minor changes to the oil-language and that's about it. It may be worth a look if you want a shell language where you can use variables without quotes.

written by 윤채경 (Yoon Chae-kyung)  2021-04-15 - last edited 2021-04-15. © CC BY

Oil-in-cool-retro-term.jpg
Oil Shell running in Cool-Retro-Term.

The Oil Shell (OSH) is, in theory, a drop-in replacement for bash with its own "oil" progrmaming language. You will, in practice, very quickly notice that you don't get to have a custom shell prompt or colors when you list files with ls if you replace bash with oil and use it as your regular shell.

The latest Oil Shell 0.8.9 release by developer Andy Chu does not come with a any release-notes. A close-up inspection of the changelog.html lists for changes to the "oil language" the Oil Shell offers in addition to the standard POSIX language Bash provides:

  • "Check type of value returns from $f(x)"
  • "Do stringification more consistently"
  • "Use new _Stringify() function for $x too"
  • "Fix "large" tests"

The many of the other changes listed in changelog concern "benchmarks". There's no such folder in the oil-0.8.9.tar.xz release.

The "oil language" is in many ways very similar to the standard POSIX shell language bash offers, though there are some real differences. You can, for example, use variables declared with the oil-specific var identifier without quotes (you should always use quotes if you use variables in bash). In bash you would do:

touch "my file.txt"
x='my file.txt'
ls $x    # Returns "No such file or directory"
ls "$x"  # Shows my file.txt. The quotes are required to avoid mangling

The above does work in oil, it is bash compatible in most, but not all, ways. You can also do it this way with the oil shell:

var x = "my file.txt"
ls $x  # file is listed

You can take a look at the "Oil Language Idioms" for examples of how regular bash compares to oil and acquire the technology from http://www.oilshell.org/releases.html if you want to see how it works. None of the GNU/Linux distributions we looked at have OSH in their repositories, so you will have to compile it yourself. It is a quick and small compile with nearly no dependencies, so you'll have it up and running in less than a minute.

0.00
(0 votes)


avatar

Gnu4ever

4 months ago
Score 0++
Sounds like the kind of project to die in a couple of months. How useless.
Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.