-
-
Notifications
You must be signed in to change notification settings - Fork 163
Carrots
andychu edited this page Jul 9, 2021
·
28 revisions
Related: Why Use Oil?
-
Removed many bash warts (e.g. with arrays and arithmetic) while still maintaining high compatibility
- Added options like
set -o strict-array
for even better behavior (for situations where you don't need bash compatibility)
- Added options like
- Better parse time and runtime error messages. The infrastructure is there, but it needs more polish.
- errors have column information!
-
-e
/errexit
failure isn't silent (TODO: show this in a post)
- More accurate interactive completion (TODO: link to blog post: The Interactive Shell Needs a Principled Parser)
- Better UI for interactive completion. (It's better than bash, but less fancy than zsh or fish.)
- conserves vertical space
- allows showing descriptions of flags (still TODO)
- Simpler configuration: a single
~/.config/oil/oshrc
file.- No rat's nest of startup files. Easier to put in a
dotfiles
repo.
- No rat's nest of startup files. Easier to put in a
- Easier to debug
- Shell crash dumps. Implemented with
OSH_CRASH_DUMP_DIR
but not documented / deployed. -
--debug-file
flag- TODO: Add
debug
ordebug-file
builtin for completion scripts. Orlog DEBUG
?
- TODO: Add
-
repr
builtin
- Shell crash dumps. Implemented with
- Future: Lower latency with coprocesses. Prototyped, but not yet in OSH.
- In addition to crash dumps, potentially better tracing (
set -x
and$PS4
). - Allow docstrings for functions ?
- show in the autocompletion UI
- generate HTML listings?
- Lightweight testing in the same file or a
-test.sh
file (e.g. Rust has this built in) - any shell script could be a "go" script, i.e. with a good error message for an invalid action
Not implemented:
- Portable .rc files? To solve the admin problem on remote servers.
- Migration path to a better language: Oil!
- Could write inline function calls and expressions, e.g.
echo $f(x, y)
- Could write inline function calls and expressions, e.g.
It's too early for this since it isn't implemented :-/ There are some potential benefits listed on Why Create a New Unix Shell?