(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <usage>
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Subshell
              left: <Id.Op_LParen _>
              child: 
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [
                    {<echo>}
                    {
                      (DQ <'Usage:    '> 
                        (CommandSub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Simple
                              blame_tok: <basename>
                              more_env: []
                              words: [{<basename>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Backtick_Right '`'>
                        ) <' [\'grep options\'] search_expr [file wildcard]\n'> <'examples: '> 
                        (CommandSub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Simple
                              blame_tok: <basename>
                              more_env: []
                              words: [{<basename>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Backtick_Right '`'>
                        ) <' \'main\' \'*.[ch]\'          #fixed string search\n'> <'          '> 
                        (CommandSub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Simple
                              blame_tok: <basename>
                              more_env: []
                              words: [{<basename>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Backtick_Right '`'>
                        ) <' \'(main|mane)\' \'*.[ch]\'   #regular expression search\n'> <'          '> 
                        (CommandSub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Simple
                              blame_tok: <basename>
                              more_env: []
                              words: [{<basename>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Backtick_Right '`'>
                        ) <' \'-F\' \'main(\' \'*.[ch]\'    #force fixed string search\n'> <'          '> 
                        (CommandSub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Simple
                              blame_tok: <basename>
                              more_env: []
                              words: [{<basename>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Backtick_Right '`'>
                        ) <' \'-L -F\' \'main(\' \'*.[ch]\' #extra grep options'>
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
              right: <Id.Right_Subshell _>
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [
                            {<Id.Lit_LBracket '['>}
                            {($ Id.VSub_Pound '#')}
                            {<-eq>}
                            {<0>}
                            {<Id.Lit_RBracket ']'>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <Id.Lit_LBracket '['>
                          more_env: []
                          words: [
                            {<Id.Lit_LBracket '['>}
                            {($ Id.VSub_Pound '#')}
                            {<-gt>}
                            {<3>}
                            {<Id.Lit_RBracket ']'>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <usage>
              more_env: []
              words: [{<usage>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [143 168]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Pipeline
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <grep>
              more_env: []
              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>})
              ]
              do_fork: T
            )
          ]
          ops: [<Id.Op_Pipe _>]
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'colour='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'colour='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'colour='> name:colour)
              op: assign_op.Equal
              rhs: {(DQ <'--color=auto'>)}
            )
          ]
          redirects: []
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_Pound '#')}
                        {<-eq>}
                        {<1>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'glob='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'glob='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(SQ <'*'>)}
                )
              ]
              redirects: []
            )
          ]
          spids: [206 219]
        )
        (IfArm
          keyword: <Id.KW_Elif elif>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_Pound '#')}
                        {<-eq>}
                        {<2>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [
                                    {<test>}
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          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 '}'>
                                        )
                                      )
                                    }
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      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>})]
                      do_fork: T
                    )
                  ]
                  spids: [258 274]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'glob='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'glob='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                )
              ]
              redirects: []
            )
          ]
          spids: [230 243]
        )
        (IfArm
          keyword: <Id.KW_Elif elif>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_Pound '#')}
                        {<-eq>}
                        {<3>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'grep_options='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'grep_options='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'grep_options='> name:grep_options)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <shift>
              more_env: []
              words: [{<shift>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'glob='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'glob='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'glob='> name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                )
              ]
              redirects: []
            )
          ]
          spids: [300 313]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      negated: <Id.KW_Bang '!'>
                      children: [
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [
                            {<printf>}
                            {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                            {(DQ ($ Id.VSub_DollarName grep_options))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <grep>
                          more_env: []
                          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>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_Pipe _>]
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.AndOr
              children: [
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <grep>
                      more_env: []
                      words: [{<grep>} {(SQ <'[.[\\()*+?{|^$]'>)}]
                      redirects: [
                        (Redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'type='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'type='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'type='> name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-E>)}
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'type='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'type='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'type='> name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-F>)}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DPipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'grep_options='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'grep_options='>
                  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))}
                )
              ]
              redirects: []
            )
          ]
          spids: [336 372]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'repodirs='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'repodirs='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'repodirs='> name:repodirs)
          op: assign_op.Equal
          rhs: {(DQ <'.git .svn CVS .hg .bzr _darcs'>)}
        )
      ]
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [dir]
      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName repodirs)}])
      semi_tok: <Id.Op_Semi _>
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'repo_ign='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'repo_ign='>
                  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) 
                        (BracedVarSub
                          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)
                      )
                    }
                )
              ]
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Pipeline
      children: [
        (command.Simple
          blame_tok: <find>
          more_env: []
          words: [
            {<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:')')}
          ]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <xargs>
          more_env: [
            (EnvPair
              left: <Id.Lit_VarLike 'GREP_COLOR='>
              name: GREP_COLOR
              val: {(DQ <'1;33;40'>)}
            )
            (EnvPair left:<Id.Lit_VarLike 'LANG='> name:LANG val:{<C>})
          ]
          words: [
            {<xargs>}
            {<-0>}
            {<grep>}
            {($ Id.VSub_DollarName colour)}
            {($ Id.VSub_DollarName grep_options)}
            {<-->}
            {(DQ ($ Id.VSub_Number 1))}
          ]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_Pipe _>]
    )
  ]
)