(C {(echo)} {(hi)}) (command.SimpleCommand words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:echo span_id:8))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:10))] ) ] ) oil AST
(C {(echo)} {(hi)})
    
oil AST
(command.SimpleCommand
  words: [
    (word.CompoundWord
      parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:echo span_id:8))]
    )
    (word.CompoundWord
      parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:10))]
    )
  ]
)
    
Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 540, in main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 513, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 487, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 320, in ShellMain ui.PrintAst(nodes_out, opts) File "/home/andy/git/oilshell/oil/core/ui.py", line 328, in PrintAst raise AssertionError AssertionError -rw-rw-r-- 1 andy andy 0 Nov 21 11:51 _tmp/smoke-ast.bin 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 WHAT lisa /home/andy/git/oilshell/oil$ hi WHAT lisa /home/andy/git/oilshell/oil$ WHAT lisa /home/andy/git/oilshell/oil$ WHAT lisa /home/andy/git/oilshell/oil$ Line 1 of '' ; ^ Invalid word while parsing command WHAT lisa /home/andy/git/oilshell/oil$ WHAT lisa /home/andy/git/oilshell/oil$ Line 1 of '' ;echo OIL OIL ^ Invalid word while parsing command WHAT lisa /home/andy/git/oilshell/oil$ OK osh-interactive WHAT lisa /home/andy/git/oilshell/oil$ 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.