(command.CommandList
  children: [
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Subshell
              child: 
                (C {<echo>} 
                  {
                    (DQ <'Usage:    '> 
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_Number 0)})
                        right: <Id.Backtick_Right '`'>
                      ) <' [\'grep options\'] search_expr [file wildcard]\n'> <'examples: '> 
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_Number 0)})
                        right: <Id.Backtick_Right '`'>
                      ) <' \'main\' \'*.[ch]\'          #fixed string search\n'> <'          '> 
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_Number 0)})
                        right: <Id.Backtick_Right '`'>
                      ) <' \'(main|mane)\' \'*.[ch]\'   #regular expression search\n'> <'          '> 
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_Number 0)})
                        right: <Id.Backtick_Right '`'>
                      ) <' \'-F\' \'main(\' \'*.[ch]\'    #force fixed string search\n'> <'          '> 
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<basename>} {($ Id.VSub_Number 0)})
                        right: <Id.Backtick_Right '`'>
                      ) <' \'-L -F\' \'main(\' \'*.[ch]\' #extra grep options'>
                    )
                  }
                )
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<3>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<usage>})]
          spids: [143 168]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.Pipeline
          children: [
            (C {<echo>})
            (command.Simple
              words: [{<grep>} {<--color> <Id.Lit_Equals '='> <auto>} {(DQ )}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              more_env: []
              do_fork: T
            )
          ]
          negated: F
          stderr_indices: []
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'colour='> name:colour)
              op: assign_op.Equal
              rhs: {(DQ <'--color=auto'>)}
              spids: [200]
            )
          ]
          redirects: []
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<1>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(SQ <'*'>)}
                  spids: [222]
                )
              ]
              redirects: []
            )
          ]
          spids: [206 219]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<2>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<test>} 
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Number 1>
                                        var_name: 1
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op: <Id.VOp1_DPound '##'>
                                            arg_word: {<-> <Id.Lit_Other '*'>}
                                          )
                                        right: <Id.Right_DollarBrace '}'>
                                      )
                                    )
                                  }
                                )
                              ]
                              negated: T
                              stderr_indices: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Warning: treating \''> ($ Id.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 '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  spids: [258 274]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                  spids: [295]
                )
              ]
              redirects: []
            )
          ]
          spids: [230 243]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-eq>} {<3>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'grep_options='> name:grep_options)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                  spids: [316]
                )
              ]
              redirects: []
            )
            (C {<shift>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                  spids: [325]
                )
              ]
              redirects: []
            )
          ]
          spids: [300 313]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<printf>} {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)} 
                          {(DQ ($ Id.VSub_DollarName grep_options))}
                        )
                        (command.Simple
                          words: [{<grep>} {<-E>} {<-->} {(DQ <'-([EFGP]|regexp|fixed)'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                          ]
                          more_env: []
                          do_fork: T
                        )
                      ]
                      negated: T
                      stderr_indices: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.Pipeline
                  children: [
                    (C {<echo>} {(DQ ($ Id.VSub_Number 1))})
                    (command.Simple
                      words: [{<grep>} {(SQ <'[.[\\()*+?{|^$]'>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  negated: F
                  stderr_indices: []
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'type='> name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-E>)}
                      spids: [398]
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'type='> name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-F>)}
                      spids: [405]
                    )
                  ]
                  redirects: []
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'grep_options='> name:grep_options)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName grep_options) <' '> ($ Id.VSub_DollarName type))}
                  spids: [411]
                )
              ]
              redirects: []
            )
          ]
          spids: [336 372]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'repodirs='> name:repodirs)
          op: assign_op.Equal
          rhs: {(DQ <'.git .svn CVS .hg .bzr _darcs'>)}
          spids: [421]
        )
      ]
      redirects: []
    )
    (command.ForEach
      iter_names: [dir]
      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName repodirs)}])
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'repo_ign='> name:repo_ign)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName repo_ign) 
                        (braced_var_sub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name repo_ign>
                          var_name: repo_ign
                          suffix_op: (suffix_op.Unary op:<Id.VTest_Plus _> arg_word:{(DQ <' -o '>)})
                          right: <Id.Right_DollarBrace '}'>
                        ) <'-name '> ($ Id.VSub_DollarName dir)
                      )
                    }
                  spids: [438]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.Pipeline
      children: [
        (C {<find>} {<.>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} {<-type>} 
          {<d>} {<-a>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} 
          {($ Id.VSub_DollarName repo_ign)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')} 
          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')} {<-prune>} {<-o>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('> ch:'(')} {<-type>} {<f>} 
          {<-name>} {(DQ ($ Id.VSub_DollarName glob))} {<-print0>} 
          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'> ch:')')}
        )
        (command.Simple
          words: [
            {<xargs>}
            {<-0>}
            {<grep>}
            {($ Id.VSub_DollarName colour)}
            {($ Id.VSub_DollarName grep_options)}
            {<-->}
            {(DQ ($ Id.VSub_Number 1))}
          ]
          redirects: []
          more_env: [
            (env_pair name:GREP_COLOR val:{(DQ <'1;33;40'>)} spids:[505])
            (env_pair name:LANG val:{<C>} spids:[510])
          ]
          do_fork: T
        )
      ]
      negated: F
      stderr_indices: []
    )
  ]
)