(CommandList
  children: [
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (Subshell
              child: 
                (C {(echo)} 
                  {
                    (DQ ("Usage:    ") 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number "$0")})]
                          )
                        left_token: <Left_Backtick "`">
                        spids: [84 88]
                      ) (" ['grep options'] search_expr [file wildcard]\n") ("examples: ") 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number "$0")})]
                          )
                        left_token: <Left_Backtick "`">
                        spids: [91 95]
                      ) (" 'main' '*.[ch]'          #fixed string search\n") ("          ") 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number "$0")})]
                          )
                        left_token: <Left_Backtick "`">
                        spids: [98 102]
                      ) (" '(main|mane)' '*.[ch]'   #regular expression search\n") ("          ") 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number "$0")})]
                          )
                        left_token: <Left_Backtick "`">
                        spids: [105 109]
                      ) (" '-F' 'main(' '*.[ch]'    #force fixed string search\n") ("          ") 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number "$0")})]
                          )
                        left_token: <Left_Backtick "`">
                        spids: [112 116]
                      ) (" '-L -F' 'main(' '*.[ch]' #extra grep options")
                    )
                  }
                )
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[122])]
              spids: [78 120]
            )
            (C {(exit)} {(1)})
          ]
          spids: [76]
        )
      spids: [72 75]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(0)} {(Lit_Other "]")})
                    (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(3)} {(Lit_Other "]")})
                  ]
                  op_id: Op_DPipe
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [(C {(usage)})]
          spids: [-1 158]
        )
      ]
      spids: [-1 163]
    )
    (AndOr
      children: [
        (Pipeline
          children: [
            (C {(echo)})
            (SimpleCommand
              words: [{(grep)} {(--color) (Lit_Other "=") (auto)} {(DQ )}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[182])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[185])
              ]
            )
          ]
          negated: False
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:colour)
              op: Equal
              rhs: {(DQ ("--color=auto"))}
              spids: [190]
            )
          ]
          spids: [190]
        )
      ]
      op_id: Op_DAmp
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(1)} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:glob) op:Equal rhs:{(SQ <"*">)} spids:[212])]
              spids: [212]
            )
          ]
          spids: [-1 209]
        )
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(2)} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (C {(test)} 
                              {
                                (DQ 
                                  (BracedVarSub
                                    token: <VSub_Number 1>
                                    suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("-*")})
                                    spids: [255 259]
                                  )
                                )
                              }
                            )
                          ]
                          negated: True
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ("Warning: treating '") ($ VSub_Number "$1") 
                            ("' as the grep pattern, not extra options.\n") ("If this is intended, avoid the warning with an empty first parameter.\n") 
                            ("If this is not intended, please specify the file wildcard.")
                          )
                        }
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[277])]
                    )
                  ]
                  spids: [-1 263]
                )
              ]
              spids: [-1 281]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:glob)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number "$2"))}
                  spids: [284]
                )
              ]
              spids: [284]
            )
          ]
          spids: [220 233]
        )
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(3)} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grep_options)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number "$1"))}
                  spids: [305]
                )
              ]
              spids: [305]
            )
            (C {(shift)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:glob)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number "$2"))}
                  spids: [314]
                )
              ]
              spids: [314]
            )
          ]
          spids: [289 302]
        )
      ]
      spids: [-1 319]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (C {(printf)} {(DQ ("%s") (EscapedLiteralPart token:<Lit_EscapedChar "\\n">))} 
                      {(DQ ($ VSub_Name "$grep_options"))}
                    )
                    (SimpleCommand
                      words: [{(grep)} {(-E)} {(--)} {(DQ ("-([EFGP]|regexp|fixed)"))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: -1
                          arg_word: {(/dev/null)}
                          spids: [353]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [356]
                        )
                      ]
                    )
                  ]
                  negated: True
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (AndOr
              children: [
                (Pipeline
                  children: [
                    (C {(echo)} {(DQ ($ VSub_Number "$1"))})
                    (SimpleCommand
                      words: [{(grep)} {(SQ <"[.[\\()*+?{|^$]">)}]
                      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[381])]
                    )
                  ]
                  negated: False
                )
                (AndOr
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:type)
                          op: Equal
                          rhs: {(DQ (-E))}
                          spids: [386]
                        )
                      ]
                      spids: [386]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:type)
                          op: Equal
                          rhs: {(DQ (-F))}
                          spids: [393]
                        )
                      ]
                      spids: [393]
                    )
                  ]
                  op_id: Op_DPipe
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grep_options)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name "$grep_options") (" ") ($ VSub_Name "$type"))}
                  spids: [399]
                )
              ]
              spids: [399]
            )
          ]
          spids: [-1 360]
        )
      ]
      spids: [-1 406]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:repodirs)
          op: Equal
          rhs: {(DQ (".git .svn CVS .hg .bzr _darcs"))}
          spids: [409]
        )
      ]
      spids: [409]
    )
    (ForEach
      iter_name: dir
      iter_words: [{($ VSub_Name "$repodirs")}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:repo_ign)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name "$repo_ign") 
                        (BracedVarSub
                          token: <VSub_Name repo_ign>
                          suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(DQ (" -o "))})
                          spids: [429 435]
                        ) ("-name ") ($ VSub_Name "$dir")
                      )
                    }
                  spids: [426]
                )
              ]
              spids: [426]
            )
          ]
          spids: [423 440]
        )
      spids: [419 421]
    )
    (Pipeline
      children: [
        (C {(find)} {(.)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\(">)} {(-type)} {(d)} {(-a)} 
          {(EscapedLiteralPart token:<Lit_EscapedChar "\\(">)} {($ VSub_Name "$repo_ign")} {(EscapedLiteralPart token:<Lit_EscapedChar "\\)">)} 
          {(EscapedLiteralPart token:<Lit_EscapedChar "\\)">)} {(-prune)} {(-o)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\(">)} {(-type)} {(f)} {(-name)} 
          {(DQ ($ VSub_Name "$glob"))} {(-print0)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\)">)}
        )
        (SimpleCommand
          words: [
            {(xargs)}
            {(-0)}
            {(grep)}
            {($ VSub_Name "$colour")}
            {($ VSub_Name "$grep_options")}
            {(--)}
            {(DQ ($ VSub_Number "$1"))}
          ]
          more_env: [
            (env_pair name:GREP_COLOR val:{(DQ ("1;33;40"))} spids:[493])
            (env_pair name:LANG val:{(C)} spids:[498])
          ]
        )
      ]
      negated: False
    )
  ]
)