(command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _ypmatch body: (command.BraceGroup children: [ (C {(local)} {(cur)} {(prev)} {(words)} {(cword)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(_init_completion)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:26) ) ] ) (C {(local)} {(map)} {(Id.Lit_VarLike 'cmd=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:36) suffix_op: (suffix_op.Unary op_id:Id.VOp1_DPound arg_word:{('*') (Id.Lit_Slash /)}) ) } ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cmd')} right: {(ypcat)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_gt left: {($ Id.VSub_DollarName '$cword')} right: {(1)} ) ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:64) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cmd')} right: {(ypmatch)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_gt left: {($ Id.VSub_DollarName '$cword')} right: {(2)} ) ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:89) arg_word: {(0)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cmd')} right: {(ypmatch)} ) right: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_eq left: {($ Id.VSub_DollarName '$cword')} right: {(1)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_eq left: { (braced_var_sub token: (Token id:Id.VSub_Name val:words span_id:117) prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {(3)} ) ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:128) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:map) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:words span_id:135) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } spids: [133] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:143) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:145) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '$( ypcat $map 2>/dev/null | \\\n' span_id: 152 ) (Token id:Id.Lit_Chars val:' cut -d' span_id:153) ) (Id.Lit_Other ':') (SQ (Token id:Id.Lit_Chars val:' -f 1 )' span_id:157)) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [142] ) ] ) ] spids: [95 130] ) ] else_action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cmd')} right: {(ypmatch)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {($ Id.VSub_DollarName '$cword')} right: {(2)} ) ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:194) arg_word: {(0)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:200) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:202) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '$( printf "%s\\n" $(ypcat -x 2>/dev/null | \\\n' span_id: 211 ) (Token id:Id.Lit_Chars val:' cut -d"\\"" -f 2) )' span_id:212) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [199] ) ] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:230) arg_word: {(0)} ) ] ) ) (C {(complete)} {(-F)} {(_ypmatch)} {(ypmatch)} {(ypcat)}) ] )