(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:16777215 arg_word:{(2)} spids:[122])]
              spids: [78 120]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [76]
        )
      spids: [72 75]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  ops: [Op_DPipe]
                  children: [
                    (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
                    (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(3)} {(Lit_Other ']')})
                  ]
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(usage)})]
          spids: [16777215 158]
        )
      ]
      spids: [16777215 163]
    )
    (AndOr
      ops: [Op_DAmp]
      children: [
        (Pipeline
          children: [
            (C {(echo)})
            (SimpleCommand
              words: [{(grep)} {(--color) (Lit_Other '=') (auto)} {(DQ )}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(/dev/null)}
                  spids: [182]
                )
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[185])
              ]
            )
          ]
          negated: F
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:colour)
              op: Equal
              rhs: {(DQ ('--color=auto'))}
              spids: [190]
            )
          ]
          spids: [190]
        )
      ]
    )
    (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: [16777215 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: T
                        )
                      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:16777215 arg_word:{(2)} spids:[277])]
                    )
                  ]
                  spids: [16777215 263]
                )
              ]
              spids: [16777215 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: [16777215 319]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (C {(printf)} {(DQ ('%s') (Lit_Other '\\') (n))} {(DQ ($ VSub_Name '$grep_options'))})
                    (SimpleCommand
                      words: [{(grep)} {(-E)} {(--)} {(DQ ('-([EFGP]|regexp|fixed)'))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [354]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [357]
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (Pipeline
                  children: [
                    (C {(echo)} {(DQ ($ VSub_Number '$1'))})
                    (SimpleCommand
                      words: [{(grep)} {(SQ <'[.[\\()*+?{|^$]'>)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [382]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:type) op:Equal rhs:{(DQ (-E))} spids:[387])]
                  spids: [387]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:type) op:Equal rhs:{(DQ (-F))} spids:[394])]
                  spids: [394]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:grep_options)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$grep_options') (' ') ($ VSub_Name '$type'))}
                  spids: [400]
                )
              ]
              spids: [400]
            )
          ]
          spids: [16777215 361]
        )
      ]
      spids: [16777215 407]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:repodirs)
          op: Equal
          rhs: {(DQ ('.git .svn CVS .hg .bzr _darcs'))}
          spids: [410]
        )
      ]
      spids: [410]
    )
    (ForEach
      iter_name: dir
      iter_words: [{($ VSub_Name '$repodirs')}]
      do_arg_iter: F
      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: [430 436]
                        ) ('-name ') ($ VSub_Name '$dir')
                      )
                    }
                  spids: [427]
                )
              ]
              spids: [427]
            )
          ]
          spids: [424 441]
        )
      spids: [420 422]
    )
    (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:[494])
            (env_pair name:LANG val:{(C)} spids:[499])
          ]
        )
      ]
      negated: F
    )
  ]
)