---
source: brush-parser/src/parser/tests/complex.rs
expression: "ParseResult { input, result: &result }"
---
ParseResult(
  input: "arr=($(seq 1 10)); echo \"${arr[@]}\"; echo \"${#arr[@]}\"",
  result: Program(
    complete_commands: [
      CompoundList([
        CompoundListItem(AndOrList(
          first: Pipeline(
            seq: [
              Simple(SimpleCommand(
                prefix: Some(CommandPrefix([
                  AssignmentWord(Assignment(
                    name: VariableName("arr"),
                    value: Array([
                      (None, Word(
                        value: "$(seq 1 10)",
                        loc: "[location]",
                      )),
                    ]),
                    loc: "[location]",
                  ), Word(
                    value: "arr=($(seq 1 10))",
                    loc: "[location]",
                  )),
                ])),
              )),
            ],
          ),
        ), Sequence),
        CompoundListItem(AndOrList(
          first: Pipeline(
            seq: [
              Simple(SimpleCommand(
                word_or_name: Some(Word(
                  value: "echo",
                  loc: "[location]",
                )),
                suffix: Some(CommandSuffix([
                  Word(Word(
                    value: "\"${arr[@]}\"",
                    loc: "[location]",
                  )),
                ])),
              )),
            ],
          ),
        ), Sequence),
        CompoundListItem(AndOrList(
          first: Pipeline(
            seq: [
              Simple(SimpleCommand(
                word_or_name: Some(Word(
                  value: "echo",
                  loc: "[location]",
                )),
                suffix: Some(CommandSuffix([
                  Word(Word(
                    value: "\"${#arr[@]}\"",
                    loc: "[location]",
                  )),
                ])),
              )),
            ],
          ),
        ), Sequence),
      ]),
    ],
  ),
)
