The title is a little misleading as Oil is yet another shell, so it’s not so much “improving a Bash script using Oil” as it is “replacing a Bash script with an Oil script”.
That’s true, but you can also use Oil just to improve a bash script… just parsing or running it with Oil may make the script more comprehensible, and less reliant on the vagaries of bash (which do change from version to version). Example with a Lisp in bash:
As always, I compare other shells to my Next Generation Shell.
$ cat p.ngs
script = fetch("package.json").scripts[ARGV]
log: bash -c $script
./p.ngs 'say hello'
[LOG 2020-09-30 08:17:45 IDT] Running command: bash -c echo\ \"Hello\ world\!\"