*** Running test-ast-formats (C {} {}) (command.Simple words: [ (compound_word parts: [ (Token id: Id.Lit_Chars col: 0 length: 4 span_id: 0 line: (SourceLine line_num:1 content:'echo hi' src:(source.CFlag)) tval: echo ) ] ) (compound_word parts: [ (Token id: Id.Lit_Chars col: 5 length: 2 span_id: 2 line: (SourceLine line_num:1 content:'echo hi' src:(source.CFlag)) tval: hi ) ] ) ] redirects: [] more_env: [] do_fork: T spids: [] ) oil AST
(C {<echo>} {<hi>})
    
oil AST
(command.Simple
  words: [
    (compound_word
      parts: [
        (Token
          id: Id.Lit_Chars
          col: 0
          length: 4
          span_id: 0
          line: (SourceLine line_num:1 content:'echo hi' src:(source.CFlag))
          tval: echo
        )
      ]
    )
    (compound_word
      parts: [
        (Token
          id: Id.Lit_Chars
          col: 5
          length: 2
          span_id: 2
          line: (SourceLine line_num:1 content:'echo hi' src:(source.CFlag))
          tval: hi
        )
      ]
    )
  ]
  redirects: []
  more_env: []
  do_fork: T
  spids: []
)
    
OK test-ast-formats *** Running test-exit-builtin-interactive [osh] lenny ~/git/oilshell/oil$ one OK test-exit-builtin-interactive *** Running test-help  App Bundle Usage  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'  bin/osh Usage  Usage: osh [OPTION]... SCRIPT [ARG]... osh [OPTION]... -c COMMAND [ARG]... 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  bin/oil Usage  Usage: oil [OPTION]... SCRIPT [ARG]... oil [OPTION]... -c COMMAND [ARG]... bin/oil is the same as bin/osh with a the oil:all option group set. So bin/oil also accepts shell flags. oil -c 'echo hi' oil myscript.oil echo 'echo hi' | oil  bin/osh Usage  Usage: osh [OPTION]... SCRIPT [ARG]... osh [OPTION]... -c COMMAND [ARG]... 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  bin/oil Usage  Usage: oil [OPTION]... SCRIPT [ARG]... oil [OPTION]... -c COMMAND [ARG]... bin/oil is the same as bin/osh with a the oil:all option group set. So bin/oil also accepts shell flags. oil -c 'echo hi' oil myscript.oil echo 'echo hi' | oil 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] lenny ~/git/oilshell/oil$ hi [osh] lenny ~/git/oilshell/oil$ ^D [osh] lenny ~/git/oilshell/oil$ [osh] lenny ~/git/oilshell/oil$ ; ^ [ stdin -i ]:1: Invalid word while parsing command [osh] lenny ~/git/oilshell/oil$ ^D [osh] lenny ~/git/oilshell/oil$ ;echo OIL OIL ^ [ stdin -i ]:1: Invalid word while parsing command [osh] lenny ~/git/oilshell/oil$ ^D [osh] lenny ~/git/oilshell/oil$ [osh] lenny ~/git/oilshell/oil$ ^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.14.2$ ^D osh-0.14.2$ ^D OK test-rc-file *** Running test-version OSH version 0.14.2 Release Date: - Arch: x86_64 OS: Linux Platform: #156~18.04.1-Ubuntu SMP Wed Jan 25 15:56:22 UTC 2023 Compiler: GCC 7.5.0 Interpreter: CPython Interpreter version: 2.7.17 Bytecode: - OK test-version test/osh-usage.sh: 9 tests passed.