(command.CommandList children: [ (command.FuncDef name: _installed_alternatives body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:admindir spids:[13]) op: Equal spids: [13] ) ] spids: [11] ) (command.ForEach iter_name: i iter_words: [{(alternatives)} {(dpkg/alternatives)} {(rpm/alternatives)}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolUnary op_id: BoolUnary_d child: {(/var/lib/) ($ VSub_DollarName '$i')} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:admindir spids:[47]) op: Equal rhs: {(/var/lib/) ($ VSub_DollarName '$i')} spids: [47] ) ] spids: [47] ) (command.ControlFlow token:<ControlFlow_Break break>) ] ) ] spids: [33 56] ) spids: [25 31] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i spids:[63]) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) cond: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike cword>) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (lhs_expr.LhsName name:i spids:[75]) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: { (DQ (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithVarRef token: <Lit_ArithVarLike i> ) ) spids: [90 95] ) ) } right: {(--admindir)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:admindir spids:[108]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token: <Lit_ArithVarLike i> ) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) spids: [109 116] ) } spids: [108] ) ] spids: [108] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 105] ) ] spids: [16777215 122] ) ] spids: [82 125] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[128]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'$( command ls $admindir )'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [131 147] ) } ] ) } spids: [128] ) ] spids: [128] ) ] spids: [8] ) spids: [4 7] ) (command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _update_alternatives body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[163]) op: Equal spids: [163] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[165]) op: Equal spids: [165] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[167]) op: Equal spids: [167] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[169]) op: Equal spids: [169] ) ] spids: [161] ) (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: [{(--altdir)} {(--admindir)}] action: [ (C {(_filedir)} {(-d)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [187 190 203 16777215] ) (case_arm pat_list: [{(--help)} {(--usage)} {(--version)}] action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [206 211 219 16777215] ) ] spids: [180 184 222] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:mode spids:[228]) op: Equal spids: [228] ) (assign_pair lhs: (lhs_expr.LhsName name:args spids:[230]) op: Equal spids: [230] ) (assign_pair lhs: (lhs_expr.LhsName name:i spids:[232]) op: Equal spids: [232] ) ] spids: [226] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Arith_Equal left: (lhs_expr.LhsName name:i spids:[244]) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) cond: (arith_expr.ArithBinary op_id: Arith_Less left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike cword>) ) update: (arith_expr.UnaryAssign op_id: Node_PostDPlus child: (lhs_expr.LhsName name:i spids:[256]) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: { (DQ (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithVarRef token: <Lit_ArithVarLike i> ) ) spids: [271 276] ) ) } right: {(--) (word_part.ExtGlobPart op: <ExtGlob_At '@('> arms: [ {(install)} {(remove)} {(auto)} {(display)} {(config)} {(remove-all)} {(set)} ] spids: [282 296] ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:mode spids:[304]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithVarRef token: <Lit_ArithVarLike i> ) ) spids: [305 310] ) } spids: [304] ) ] spids: [304] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:args spids:[313]) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$cword')} ) right: (arith_expr.ArithVarRef token: <Lit_ArithVarLike i> ) ) spids: [314 321] ) } spids: [313] ) ] spids: [313] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 301] ) ] spids: [16777215 327] ) ] spids: [263 330] ) ) (command.Case to_match: {($ VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [{(--install)}] action: [ (command.Case to_match: {($ VSub_DollarName '$args')} arms: [ (case_arm pat_list: [{(1)} {(3)}] action: [(C {(_filedir)})] spids: [352 355 361 16777215] ) (case_arm pat_list: [{(2)}] action: [(C {(_installed_alternatives)})] spids: [364 365 371 16777215] ) (case_arm pat_list: [{(4)}] spids: [374 375 382 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Case to_match: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Percent left: (arith_expr.ArithVarRef token: <Lit_ArithVarLike args> ) right: (arith_expr.ArithWord w:{(Lit_Digits 4)}) ) spids: [391 398] ) } arms: [ (case_arm pat_list: [{(0)} {(2)}] action: [(C {(_filedir)})] spids: [403 406 412 16777215] ) (case_arm pat_list: [{(1)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[419]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <--slave>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [422 438] ) } ] ) } spids: [419] ) ] spids: [419] ) ] spids: [415 416 443 16777215] ) (case_arm pat_list: [{(3)}] action: [(C {(_installed_alternatives)})] spids: [446 447 453 16777215] ) ] spids: [389 400 456] ) ] spids: [385 386 16777215 459] ) ] spids: [345 349 459] ) ] spids: [341 342 462 16777215] ) (case_arm pat_list: [{(--remove)} {(--set)}] action: [ (command.Case to_match: {($ VSub_DollarName '$args')} arms: [ (case_arm pat_list: [{(1)}] action: [(C {(_installed_alternatives)})] spids: [478 479 485 16777215] ) (case_arm pat_list: [{(2)}] action: [(C {(_filedir)})] spids: [488 489 495 16777215] ) ] spids: [471 475 498] ) ] spids: [465 468 501 16777215] ) (case_arm pat_list: [{(--auto)} {(--remove-all)} {(--display)} {(--config)}] action: [(C {(_installed_alternatives)})] spids: [504 511 517 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[524]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ <'--verbose --quiet --help --version\n'> < ' --altdir --admindir --install --remove --auto --display\n' > <' --config --set'> ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [527 545] ) } ] ) } spids: [524] ) ] spids: [524] ) ] spids: [520 521 16777215 550] ) ] spids: [334 338 550] ) ] spids: [158] ) spids: [154 157] ) (C {(complete)} {(-F)} {(_update_alternatives)} {(update-alternatives)} {(alternatives)}) ] ) ] )