(command.CommandList children: [ (command.ShFunction name: _perlmodules body: (command.BraceGroup children: [ (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:12) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:14) command_list: (command.CommandList children: [ (C {(compgen)} {(-P)} {(DQ ($ Id.VSub_DollarName '$prefix'))} {(-W)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 29 ) command_list: (command.CommandList children: [ (C { (braced_var_sub token: (Token id: Id.VSub_Number val: 1 span_id: 32 ) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(perl)} ) ) } { (braced_var_sub token: (Token id: Id.VSub_Name val: BASH_SOURCE span_id: 38 ) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {(Id.Lit_Digits 0)} ) ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {(Id.Lit_Slash /) ('*')} ) ) (/../helpers/perl) } {(modules)} {($ Id.VSub_DollarName '$cur')} ) ] ) ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [11] ) ] ) (C {(__ltrim_colon_completions)} {(DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$cur'))} ) ] ) ) (command.ShFunction name: _perlfunctions body: (command.BraceGroup children: [ (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:86) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:88) command_list: (command.CommandList children: [ (C {(compgen)} {(-P)} {(DQ ($ Id.VSub_DollarName '$prefix'))} {(-W)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 103 ) command_list: (command.CommandList children: [ (C { (braced_var_sub token: (Token id: Id.VSub_Number val: 1 span_id: 106 ) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(perl)} ) ) } { (braced_var_sub token: (Token id: Id.VSub_Name val: BASH_SOURCE span_id: 112 ) bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {(Id.Lit_Digits 0)} ) ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {(Id.Lit_Slash /) ('*')} ) ) (/../helpers/perl) } {(functions)} {($ Id.VSub_DollarName '$cur')} ) ] ) ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [85] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _perl body: (command.BraceGroup children: [ (C {(local)} {(cur)} {(prev)} {(words)} {(cword)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(_init_completion)} {(-n)} {(Id.Lit_Other ':')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:170) ) ] ) (C {(local)} {(Id.Lit_VarLike 'prefix=') (DQ )} {(temp)} {(optPrefix)} {(optSuffix)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {(-) (Id.Lit_Other '?') (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:207) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$cur')} spids: [212] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prev) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:temp span_id:218) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } spids: [216] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:temp span_id:228) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } spids: [226] ) ] ) (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 '$prev')} right: {(Id.BoolUnary_d -d)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cur')} right: {(t) (Id.Lit_Other '*')} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:254) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prev) op: assign_op.Equal rhs: {(-dt)} spids: [259] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:265) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } spids: [263] ) ] ) ] spids: [234 256] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:optPrefix) op: assign_op.Equal rhs: {(-P) ($ Id.VSub_DollarName '$prev')} spids: [274] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:optSuffix) op: assign_op.Equal rhs: {(-S/)} spids: [279] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$prev')} spids: [283] ) ] ) ] spids: [192 209] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-D)} {(-e)} {(-E)} {(-i)} {(-F)} {(-l)}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:312) arg_word: {(0)} ) ] spids: [298 309 317 -1] ) (case_arm pat_list: [{(-I)} {(-x)}] action: [ (C {(local)} {(Id.Lit_VarLike 'IFS=') (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:329) tokens: [(Token id:Id.Char_OneChar val:'\\n' span_id:330)] ) } ) (C {(compopt)} {(-o)} {(filenames)}) (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:342) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 344 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-d)} {($ Id.VSub_DollarName '$optPrefix')} {($ Id.VSub_DollarName '$optSuffix')} {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [341] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:365) arg_word: {(0)} ) ] spids: [320 323 370 -1] ) (case_arm pat_list: [{(-m)} {(-M)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:382) suffix_op: (suffix_op.Unary op_id:Id.VOp1_Pound arg_word:{(-)}) ) ) } spids: [379] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.PlusEqual rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:392) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {($ Id.VSub_DollarName '$temp')} ) ) ) } spids: [389] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$temp'))} spids: [399] ) ] ) (C {(_perlmodules)} {($ Id.VSub_Number '$1')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:410) arg_word: {(0)} ) ] spids: [373 376 415 -1] ) (case_arm pat_list: [{(-V)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cur')} right: {(Id.Lit_Other ':') (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:434) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:442) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('+(:)')} ) ) ) } spids: [439] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.PlusEqual rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:452) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {($ Id.VSub_DollarName '$temp')} ) ) ) } spids: [449] ) ] ) (C {(local)} {(Id.Lit_VarLike 'IFS=') (single_quoted left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:462) tokens: [(Token id:Id.Char_OneChar val:'\\n' span_id:463)] ) } ) (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:468) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 470 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-P)} {(DQ ($ Id.VSub_DollarName '$prefix'))} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '$( $1 -MConfig -e "print join \\"\\\\n\\",\n' span_id: 485 ) (Token id:Id.Lit_Chars val:' keys %Config::Config" 2>/dev/null )' span_id:486) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$temp'))} ) ] ) ) } ] ) } spids: [467] ) ] ) (C {(__ltrim_colon_completions)} { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$temp') ) } ) ] spids: [422 436] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:511) arg_word: {(0)} ) ] spids: [418 419 516 -1] ) (case_arm pat_list: [{(-d)} {(-dt)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cur')} right: {(Id.Lit_Other ':') (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:537) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:545) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {(':')} ) ) ) } spids: [542] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$prefix') (braced_var_sub token: (Token id:Id.VSub_Name val:cur span_id:556) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {($ Id.VSub_DollarName '$temp')} ) ) ) } spids: [552] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.Equal rhs: {(DQ ('Devel::') ($ Id.VSub_DollarName '$temp'))} spids: [563] ) ] ) (C {(_perlmodules)} {($ Id.VSub_Number '$1')}) ] spids: [525 539] ) ] ) ] spids: [519 522 578 -1] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {(-) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:599) ) ] action: [ (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:605) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 607 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '-C -s -T -u -U -W -X -h -v -V -c -w -d -D -p\n' span_id: 614 ) (Token id:Id.Lit_Chars val:' -n -a -F -l -0 -I -m -M -P -S -x -i -e' span_id:615) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [604] ) ] ) ] spids: [585 601] ) ] else_action: [(C {(_filedir)})] ) ] ) ) (C {(complete)} {(-F)} {(_perl)} {(perl)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _perldoc body: (command.BraceGroup children: [ (C {(local)} {(cur)} {(prev)} {(words)} {(cword)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(_init_completion)} {(-n)} {(Id.Lit_Other ':')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:676) ) ] ) (C {(local)} {(Id.Lit_VarLike 'prefix=') (DQ )} {(temp)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {(-) (Id.Lit_Other '?') (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:709) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:temp) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$cur')} spids: [714] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prev) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:temp span_id:720) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } spids: [718] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cur) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id:Id.VSub_Name val:temp span_id:730) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)}) ) ) } spids: [728] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$prev')} spids: [736] ) ] ) ] spids: [694 711] ) ] ) (C {(local)} {(Id.Lit_VarLike 'perl=') (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:749) suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{(doc)}) ) ) } ) (command.AndOr ops: [Id.Op_DPipe Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$perl')} right: {($ Id.VSub_Number '$1')} ) ) (command.Pipeline children: [ (command.Simple words: [{(type)} {($ Id.VSub_DollarName '$perl')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_AndGreat val:'&>' span_id:774) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:perl) op: assign_op.Equal rhs: (word.Empty) spids: [779] ) ] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{(-h)} {(-V)} {(-n)} {(-o)} {(-M)} {(-w)} {(-L)}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:806) arg_word: {(0)} ) ] spids: [790 803 811 -1] ) (case_arm pat_list: [{(-d)}] action: [ (C {(_filedir)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:821) arg_word: {(0)} ) ] spids: [814 815 826 -1] ) (case_arm pat_list: [{(-f)}] action: [ (C {(_perlfunctions)} {($ Id.VSub_DollarName '$perl')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:838) arg_word: {(0)} ) ] spids: [829 830 843 -1] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: {(-) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:864) ) ] action: [ (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:870) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 872 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '$( _parse_help "$1" -h )' span_id: 879 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [869] ) ] ) ] spids: [850 866] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$cur'))} right: { (word_part.ExtGlob op: (Token id:Id.ExtGlob_At val:'@(' span_id:910) arms: [{(Id.Lit_Other '*') (/)} {('[.~]')}] ) (Id.Lit_Other '*') } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:919) ) ] action: [ (C {(_perlmodules)} {($ Id.VSub_DollarName '$perl')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$cur')} right: {(p) (Id.Lit_Other '*')} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:941) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.PlusEqual rhs: { (sh_array_literal left: (Token id:Id.Op_LParen val:'(' span_id:947) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 949 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '$( PERLDOC_PAGER=/bin/cat "$1" -u perl | \\\n' span_id: 958 ) (Token id: Id.Lit_Chars val: ' sed -ne "/perl.*Perl overview/,/perlwin32/p" | \\\n' span_id: 959 ) (Token id: Id.Lit_Chars val: ' awk "\\$NF=2 && \\$1 ~ /^perl/ { print \\$1 }" )' span_id: 960 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [946] ) ] ) ] spids: [929 943] ) ] ) ] spids: [900 921] ) ] ) (C {(_filedir)} {(SQ (Token id:Id.Lit_Chars val:'p@([lm]|od)' span_id:985))}) ] ) ] ) ) (C {(complete)} {(-F)} {(_perldoc)} {(-o)} {(bashdefault)} {(perldoc)}) ] ) ] )