*** Running test-ast-formats (command.Simple blame_tok: <Id.Lit_Chars echo> more_env: [] words: [{<Id.Lit_Chars echo>} {<Id.Lit_Chars hi>}] is_last_cmd: F ) (command.Simple blame_tok: (Token id:Id.Lit_Chars length:4 col:0 line:(SourceLine line_num:1 content:"echo hi" src:(source__CFlag))) more_env: [] words: [ (CompoundWord parts:[...0x7fe51d13b738]) (CompoundWord parts:[(Token id:Id.Lit_Chars length:2 col:5 line:...0x7fe51d14d520)]) ] is_last_cmd: F ) <html> <head> <title>oil AST</title> <style> .n { color: brown } .s { font-weight: bold } .o { color: darkgreen } </style> </head> <body> <pre> (<span class="n">command.Simple</span> blame_tok: <<span class="o">Id.Lit_Chars</span> <span class="s">echo</span>> more_env: [] words: [{<<span class="o">Id.Lit_Chars</span> <span class="s">echo</span>>} {<<span class="o">Id.Lit_Chars</span> <span class="s">hi</span>>}] is_last_cmd: <span class="o">F</span> ) </pre> </body> </html> <html> <head> <title>oil AST</title> <style> .n { color: brown } .s { font-weight: bold } .o { color: darkgreen } </style> </head> <body> <pre> (<span class="n">command.Simple</span> blame_tok: (<span class="n">Token</span> id:<span class="o">Id.Lit_Chars</span> length:<span class="o">4</span> col:<span class="o">0</span> line:(<span class="n">SourceLine</span> line_num:<span class="o">1</span> content:<span class="s">"echo hi"</span> src:(<span class="n">source__CFlag</span>))) more_env: [] words: [ (<span class="n">CompoundWord</span> parts:[...0x7fc0e99ef738]) (<span class="n">CompoundWord</span> parts:[(<span class="n">Token</span> id:<span class="o">Id.Lit_Chars</span> length:<span class="o">2</span> col:<span class="o">5</span> line:...0x7fc0e9a01520)]) ] is_last_cmd: <span class="o">F</span> ) </pre> </body> </html> OK test-ast-formats *** Running test-exit-builtin-interactive osh-0.22.0$ one OK test-exit-builtin-interactive *** Running test-help Oils 0.22.0 https://www.oilshell.org/ ~~~ oils-usage ~~~ bin/oils-for-unix is an executable that contains OSH, YSH, and more. Usage: oils-for-unix MAIN_NAME ARG* MAIN_NAME ARG* It behaves like busybox. The command name can be passed as the first argument: oils-for-unix ysh -c 'echo hi' More commonly, it's invoked through a symlink like 'ysh', which causes it to behave like that command: ysh -c 'echo hi' Oils 0.22.0 https://www.oilshell.org/ ~~~ osh-usage ~~~ bin/osh is compatible with POSIX shell, bash, and other shells. Usage: osh FLAG* SCRIPT ARG* osh FLAG* -c COMMAND ARG* osh FLAG* The command line accepted by `bin/osh` is compatible with /bin/sh and bash. osh -c 'echo hi' osh myscript.sh echo 'echo hi' | osh It also has a few enhancements: osh -n -c 'hello' # pretty-print the AST osh --ast-format text -n -c 'hello' # print it full osh accepts POSIX sh flags, with these additions: -n parse the program but don't execute it. Print the AST. --ast-format what format the AST should be in Oils 0.22.0 https://www.oilshell.org/ ~~~ ysh-usage ~~~ bin/ysh is the shell with data tYpes, influenced by pYthon, JavaScript, ... Usage: ysh FLAG* SCRIPT ARG* ysh FLAG* -c COMMAND ARG* ysh FLAG* `bin/ysh` is the same as `bin/osh` with a the `ysh:all` option group set. So `bin/ysh` also accepts shell flags. ysh -c 'echo hi' ysh myscript.ysh echo 'echo hi' | ysh Oils 0.22.0 https://www.oilshell.org/ ~~~ osh-usage ~~~ bin/osh is compatible with POSIX shell, bash, and other shells. Usage: osh FLAG* SCRIPT ARG* osh FLAG* -c COMMAND ARG* osh FLAG* The command line accepted by `bin/osh` is compatible with /bin/sh and bash. osh -c 'echo hi' osh myscript.sh echo 'echo hi' | osh It also has a few enhancements: osh -n -c 'hello' # pretty-print the AST osh --ast-format text -n -c 'hello' # print it full osh accepts POSIX sh flags, with these additions: -n parse the program but don't execute it. Print the AST. --ast-format what format the AST should be in Oils 0.22.0 https://www.oilshell.org/ ~~~ oils-usage ~~~ bin/oils-for-unix is an executable that contains OSH, YSH, and more. Usage: oils-for-unix MAIN_NAME ARG* MAIN_NAME ARG* It behaves like busybox. The command name can be passed as the first argument: oils-for-unix ysh -c 'echo hi' More commonly, it's invoked through a symlink like 'ysh', which causes it to behave like that command: ysh -c 'echo hi' OK test-help *** Running test-noexec-fails-properly echo; echo; | ^ [ -c flag ]:1: Invalid word while parsing command _tmp/osh-usage-noexec.txt appears empty, as expected OK test-noexec-fails-properly *** Running test-osh-file ===== Hello hi inside func in subshell another ComSub ===== EMPTY ===== NO TRAILING NEWLINE hi OK test-osh-file *** Running test-osh-interactive osh-0.22.0$ hi osh-0.22.0$ ^D osh-0.22.0$ osh-0.22.0$ ; ^ [ stdin -i ]:1: Invalid word while parsing command osh-0.22.0$ ^D osh-0.22.0$ ;echo OIL OIL ^ [ stdin -i ]:1: Invalid word while parsing command osh-0.22.0$ ^D osh-0.22.0$ osh-0.22.0$ ^D OK test-osh-interactive *** Running test-osh-stdin hi inside func in subshell another ComSub ===== EMPTY ===== NO TRAILING NEWLINE hi hi line continuation two here doc command sub OK test-osh-stdin *** Running test-rc-file TESTRC$ ^D osh-0.22.0$ ^D osh-0.22.0$ ^D OK test-rc-file *** Running test-version Oils 0.22.0 https://www.oilshell.org/ Release Date: - Arch: x86_64 OS: Linux Platform: #26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024 Compiler: GCC 8.3.0 Interpreter: CPython Interpreter version: 2.7.16 Bytecode: - OK test-version test/osh-usage.sh: 9 tests passed.