(command.CommandList
  children: [
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (command.Subshell
              command_list: 
                (command.CommandList
                  children: [
                    (C {<echo>} 
                      {
                        (DQ <'Usage:    '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <" ['grep options'] search_expr [file wildcard]\n"> <'examples: '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <" 'main' '*.[ch]'          #fixed string search\n"> <'          '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <" '(main|mane)' '*.[ch]'   #regular expression search\n"> <'          '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <" '-F' 'main(' '*.[ch]'    #force fixed string search\n"> <'          '> 
                          (command_sub
                            left_token: <Id.Left_Backtick '`'>
                            command_list: 
                              (command.CommandList
                                children: [(C {<basename>} {($ Id.VSub_Number '$0')})]
                              )
                          ) <" '-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>})
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (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]
        )
      ]
    )
    (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>})
              ]
            )
          ]
          negated: F
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:colour)
              op: assign_op.Equal
              rhs: {(DQ <'--color=auto'>)}
              spids: [200]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (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 name:glob)
                  op: assign_op.Equal
                  rhs: {(SQ <'*'>)}
                  spids: [222]
                )
              ]
            )
          ]
          spids: [206 219]
        )
        (if_arm
          cond: [
            (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: [
                    (command.Sentence
                      child: 
                        (command.Pipeline
                          children: [
                            (C {<test>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Number 1>
                                    suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPound arg_word:{<'-*'>})
                                  )
                                )
                              }
                            )
                          ]
                          negated: T
                        )
                      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>})]
                    )
                  ]
                  spids: [258 273]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [294]
                )
              ]
            )
          ]
          spids: [230 243]
        )
        (if_arm
          cond: [
            (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 name:grep_options)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [315]
                )
              ]
            )
            (C {<shift>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:glob)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [324]
                )
              ]
            )
          ]
          spids: [299 312]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {<printf>} {(DQ <'%s'> <Id.Lit_Other '\\'> <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>}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              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>}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-E>)}
                      spids: [397]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:type)
                      op: assign_op.Equal
                      rhs: {(DQ <-F>)}
                      spids: [404]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:grep_options)
                  op: assign_op.Equal
                  rhs: 
                    {(DQ ($ Id.VSub_DollarName '$grep_options') <' '> ($ Id.VSub_DollarName '$type'))}
                  spids: [410]
                )
              ]
            )
          ]
          spids: [335 371]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:repodirs)
          op: assign_op.Equal
          rhs: {(DQ <'.git .svn CVS .hg .bzr _darcs'>)}
          spids: [420]
        )
      ]
    )
    (command.ForEach
      iter_name: dir
      iter_words: [{($ Id.VSub_DollarName '$repodirs')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repo_ign)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ ($ Id.VSub_DollarName '$repo_ign') 
                        (braced_var_sub
                          token: <Id.VSub_Name repo_ign>
                          suffix_op: (suffix_op.Unary op_id:Id.VTest_Plus arg_word:{(DQ <' -o '>)})
                        ) <'-name '> ($ Id.VSub_DollarName '$dir')
                      )
                    }
                  spids: [437]
                )
              ]
            )
          ]
        )
    )
    (command.Pipeline
      children: [
        (C {<find>} {<.>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} {<-type>} {<d>} 
          {<-a>} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} {($ Id.VSub_DollarName '$repo_ign')} 
          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)} {<-prune>} {<-o>} 
          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\('>)} {<-type>} {<f>} {<-name>} {(DQ ($ Id.VSub_DollarName '$glob'))} {<-print0>} 
          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\)'>)}
        )
        (command.Simple
          words: [
            {<xargs>}
            {<-0>}
            {<grep>}
            {($ Id.VSub_DollarName '$colour')}
            {($ Id.VSub_DollarName '$grep_options')}
            {<-->}
            {(DQ ($ Id.VSub_Number '$1'))}
          ]
          more_env: [
            (env_pair name:GREP_COLOR val:{(DQ <'1;33;40'>)} spids:[504])
            (env_pair name:LANG val:{<C>} spids:[509])
          ]
        )
      ]
      negated: F
    )
  ]
)