(command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _sh body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[13]) op: Equal spids: [13] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[15]) op: Equal spids: [15] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[17]) op: Equal spids: [17] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[19]) op: Equal spids: [19] ) ] spids: [11] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Case to_match: {($ VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-c)}] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [37 38 46 16777215] ) (case_arm pat_list: [{(-o)} {(Lit_Other '+') (o)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[56]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ <'allexport errexit ignoreeof monitor\n'> < ' noclobber noglob noexec nolog notify nounset verbose vi\n' > <' xtrace'> ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [59 77] ) } ] ) } spids: [56] ) ] spids: [56] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [49 53 87 16777215] ) ] spids: [30 34 90] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:opts spids:[96]) op: Equal rhs: {(DQ ('-a -b -C -e -f -h -i -m -n -o -u -v -x'))} spids: [96] ) ] spids: [94] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(-) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[121]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(DQ ($ VSub_DollarName '$opts') (' -c -s'))} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [124 141] ) } ] ) } spids: [121] ) ] spids: [121] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [16777215 118] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$cur'))} right: {(Lit_Other '+') (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[170]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (DQ (word_part.BracedVarSub token: <VSub_Name opts> suffix_op: (suffix_op.PatSub pat: {(-)} replace: {('+')} replace_mode: Lit_Slash spids: [182] ) spids: [180 187] ) ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [173 196] ) } ] ) } spids: [170] ) ] spids: [170] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [151 167] ) ] spids: [16777215 206] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:args spids:[212]) op: Equal spids: [212] ) (assign_pair lhs: (lhs_expr.LhsName name:ext spids:[214]) op: Equal rhs: (word.EmptyWord) spids: [214] ) ] spids: [210] ) (C {(_count_args)}) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_eq left: {($ VSub_DollarName '$args')} right: {(1)} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ext spids:[232]) op: Equal rhs: {(sh)} spids: [232] ) ] spids: [232] ) ] ) (C {(_filedir)} {($ VSub_DollarName '$ext')}) ] spids: [8] ) spids: [4 7] ) (C {(complete)} {(-F)} {(_sh)} {(sh)}) ] )