(command.CommandList children: [ (command.ShFunction name: usage body: (BraceGroup children: [ (command.Subshell child: (C {<echo>} { (DQ <'Usage: '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' [\'grep options\'] search_expr [file wildcard]\n'> <'examples: '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' \'main\' \'*.[ch]\' #fixed string search\n'> <' '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' \'(main|mane)\' \'*.[ch]\' #regular expression search\n'> <' '> (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {($ Id.VSub_Number '$0')}) ) <' \'-F\' \'main(\' \'*.[ch]\' #force fixed string search\n'> <' '> (command_sub left_token: <Id.Left_Backtick '`'> child: (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: (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] ) ] ) (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>}) ] do_fork: T ) ] 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: (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 name:glob) op: assign_op.Equal rhs: {(SQ <'*'>)} spids: [222] ) ] ) ] 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 token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<-> <Id.Lit_Other '*'>} ) ) ) } ) ] 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>})] do_fork: T ) ] spids: [258 274] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:glob) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [295] ) ] ) ] 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 name:grep_options) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [316] ) ] ) (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: [325] ) ] ) ] spids: [300 313] ) ] ) (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>} ) ] do_fork: T ) ] 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'>} ) ] do_fork: T ) ] negated: F ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:type) op: assign_op.Equal rhs: {(DQ <-E>)} spids: [398] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:type) op: assign_op.Equal rhs: {(DQ <-F>)} spids: [405] ) ] ) ] ) (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: [411] ) ] ) ] spids: [336 372] ) ] ) (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: [421] ) ] ) (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 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 tok:<Id.VTest_Plus '+'> arg_word:{(DQ <' -o '>)}) ) <'-name '> ($ Id.VSub_DollarName '$dir') ) } spids: [438] ) ] ) ] ) ) (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:[505]) (env_pair name:LANG val:{<C>} spids:[510]) ] do_fork: T ) ] negated: F ) ] )