(C {(echo)} {(hi)}) (SimpleCommand words: [ (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:echo span_id:0))]) (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:hi span_id:2))]) ] ) oil AST
(C {(echo)} {(hi)})
    
oil AST
(SimpleCommand
  words: [
    (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:echo span_id:0))])
    (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:hi span_id:2))])
  ]
)
    
-rw-rw-r-- 1 andy andy 152 Oct 20 13:27 _tmp/smoke-ast.bin 00000000 4f 48 50 01 04 23 00 00 65 63 68 6f 00 00 00 00 |OHP..#..echo....| 00000010 00 00 00 00 0b 00 00 02 00 00 00 00 00 04 00 00 |................| 00000020 00 00 00 00 05 00 00 08 00 00 00 00 01 00 00 09 |................| 00000030 00 00 00 00 00 00 00 00 0b 00 00 0d 00 00 00 00 |................| 00000040 68 69 00 00 00 00 00 00 0b 00 00 10 00 00 02 00 |hi..............| 00000050 00 11 00 00 00 00 00 00 12 00 00 15 00 00 00 00 |................| 00000060 01 00 00 16 00 00 00 00 00 00 00 00 18 00 00 1a |................| 00000070 00 00 00 00 02 00 00 0e 00 00 1b 00 00 00 00 00 |................| 00000080 00 00 00 00 00 00 00 00 00 00 00 00 1d 00 00 20 |............... | 00000090 00 00 21 00 00 22 00 00 |..!.."..| 00000098 OK ast-formats ===== Hello hi inside func in subshell another ComSub ===== EMPTY ===== NO TRAILING NEWLINE hi OK osh-file hi inside func in subshell another ComSub ComSub ===== EMPTY ===== NO TRAILING NEWLINE hi hi line continuation two here doc command sub OK osh-stdin osh$ hi osh$ osh$ osh$ Line 1 of '' ; ^ Invalid word while parsing command osh$ osh$ Line 1 of '' ;echo OIL OIL ^ Invalid word while parsing command osh$ OK osh-interactive osh$ one OK exit-builtin-interactive Usage: oil.ovm MAIN_NAME [ARG]... MAIN_NAME [ARG]... oil.ovm behaves like busybox. If it's invoked through a symlink, e.g. 'osh', then it behaves like that binary. Otherwise the binary name can be passed as the first argument, e.g.: oil.ovm osh -c 'echo hi' Usage: osh [OPTION]... SCRIPT [ARG]... osh [OPTION]... -c COMMAND [ARG]... osh accepts POSIX sh flags, with the following differences: -n only validate the syntax. Also prints the AST. --show-ast print the AST in addition to executing. --ast-format what format the AST should be in Usage: oil [OPTION]... SCRIPT [ARG]... oil [OPTION]... -c COMMAND [ARG]... TODO: any changes? Usage: osh [OPTION]... SCRIPT [ARG]... osh [OPTION]... -c COMMAND [ARG]... osh accepts POSIX sh flags, with the following differences: -n only validate the syntax. Also prints the AST. --show-ast print the AST in addition to executing. --ast-format what format the AST should be in Usage: oil [OPTION]... SCRIPT [ARG]... oil [OPTION]... -c COMMAND [ARG]... TODO: any changes? OK help All test/osh-usage.sh tests passed.