(C {(echo)} {(hi)}) (command.SimpleCommand words: [ (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:echo span_id:0))] ) (word.CompoundWord parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:2))] ) ] ) 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:0))]
    )
    (word.CompoundWord
      parts: [(word_part.LiteralPart token:(token id:Lit_Chars val:hi span_id:2))]
    )
  ]
)
    
Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 654, in main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 623, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 597, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 430, in ShellMain ui.PrintAst(nodes_out, opts) File "/home/andy/git/oilshell/oil/core/ui.py", line 331, in PrintAst raise AssertionError AssertionError -rw-rw-r-- 1 andy andy 0 Jan 18 12: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 [osh] lisa /home/andy/git/oilshell/oil$ hi [osh] lisa /home/andy/git/oilshell/oil$ ^D [osh] lisa /home/andy/git/oilshell/oil$ Line 1 of '' ; ^ Invalid word while parsing command [osh] lisa /home/andy/git/oilshell/oil$ [osh] lisa /home/andy/git/oilshell/oil$ ^D Line 1 of '' ;echo OIL OIL ^ Invalid word while parsing command [osh] lisa /home/andy/git/oilshell/oil$ [osh] lisa /home/andy/git/oilshell/oil$ ^D OK osh-interactive [osh] lisa /home/andy/git/oilshell/oil$ one OK exit-builtin-interactive TESTRC$ ^D osh$ ^D OK rc-file 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 Line 1 of '' echo; echo; | ^ Invalid word while parsing command _tmp/osh-usage-noexec.txt appears empty, as expected OK noexec-fails-properly All test/osh-usage.sh tests passed.