Why Sponsor Oils? | source | all docs for version 0.23.0 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
This doc is for contributors or users who want to understand the Oils codebase. These internal details are subject to change.
ls */*_def.py */*_gen.py
def.py files are abstract definitions. They're not translated by
mycpp.gen.py files generate source code in Python and C++ from these
definitions.Id type and the lexing rules abstractly.def / gen pair.compgen -W (bash only)complete -F ls_complete_func lscommand_not_found hook; OSH doesn't yetSee the doc on Unicode.
In OSH:
echo -e '\x00\n' and echo $'\x00\n' (OSH shares lexer rules between them)test / [ and [[ (OSH shares the parser and evaluator)local x=$y vs. s='x=$y'; local $s.
Other Pairs:
expr and $(( )) (expr not in shell)${myfloat %.3f}find and our own language (although this may be done with blocks)$IFS splitting in osh/split.pyargv by user-defined delimiters,
e.g. :=The point of a state machine is to make sure all cases are handled!
ExecuteAndCatch uses mem.CurrentLocation()Failglob uses mem.CurrentLocation()mem.GetVar $LINENO uses current_tok, but it can be buggy
BASH_LINENO, which is for the call stack!Other:
ui.ctx_Location
errfmt.Print_() without locationsalloc.ctx_SourceCode for assigning source_t to tokens