(command.CommandList children: [ (command.ShFunction name: _installed_alternatives body: (BraceGroup children: [ (C {<local>} {<admindir>}) (command.ForEach iter_name: i iter_words: [{<alternatives>} {<'dpkg/alternatives'>} {<'rpm/alternatives'>}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_d child: {<'/var/lib/'> ($ Id.VSub_DollarName '$i')} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:admindir) op: assign_op.Equal rhs: {<'/var/lib/'> ($ Id.VSub_DollarName '$i')} spids: [47] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) ] ) ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: <Id.Lit_ArithVarLike cword> ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:<Id.Lit_ArithVarLike i>) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) ) } right: {<--admindir>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:admindir) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) ) ) } spids: [108] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [85 105] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(SQ <'$( command ls $admindir )'>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [128] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _update_alternatives body: (BraceGroup children: [ (C {<local>} {<cur>} {<prev>} {<words>} {<cword>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<_init_completion>}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [{<--altdir>} {<--admindir>}] action: [ (C {<_filedir>} {<-d>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [187 190 203 -1] ) (case_arm pat_list: [{<--help>} {<--usage>} {<--version>}] action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [206 211 219 -1] ) ] ) (C {<local>} {<mode>} {<args>} {<i>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 1>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: <Id.Lit_ArithVarLike cword> ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike i> ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (DQ (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) ) } right: {<--> (word_part.ExtGlob op: <Id.ExtGlob_At '@('> arms: [ {<install>} {<remove>} {<auto>} {<display>} {<config>} {<remove-all>} {<set>} ] ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mode) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name words> bracket_op: (bracket_op.ArrayIndex expr: <Id.Lit_ArithVarLike i> ) ) } spids: [304] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName '$cword')} right: <Id.Lit_ArithVarLike i> ) ) } spids: [313] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [266 301] ) ] ) ] ) ) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [{<--install>}] action: [ (command.Case to_match: {($ Id.VSub_DollarName '$args')} arms: [ (case_arm pat_list: [{<1>} {<3>}] action: [(C {<_filedir>})] spids: [352 355 361 -1] ) (case_arm pat_list: [{<2>}] action: [(C {<_installed_alternatives>})] spids: [364 365 371 -1] ) (case_arm pat_list: [{<4>}] spids: [374 375 382 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Case to_match: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Percent left: <Id.Lit_ArithVarLike args> right: {<Id.Lit_Digits 4>} ) ) } arms: [ (case_arm pat_list: [{<0>} {<2>}] action: [(C {<_filedir>})] spids: [403 406 412 -1] ) (case_arm pat_list: [{<1>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} {(SQ <--slave>)} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [419] ) ] ) ] spids: [415 416 443 -1] ) (case_arm pat_list: [{<3>}] action: [(C {<_installed_alternatives>})] spids: [446 447 453 -1] ) ] ) ] spids: [385 386 -1 459] ) ] ) ] spids: [341 342 462 -1] ) (case_arm pat_list: [{<--remove>} {<--set>}] action: [ (command.Case to_match: {($ Id.VSub_DollarName '$args')} arms: [ (case_arm pat_list: [{<1>}] action: [(C {<_installed_alternatives>})] spids: [478 479 485 -1] ) (case_arm pat_list: [{<2>}] action: [(C {<_filedir>})] spids: [488 489 495 -1] ) ] ) ] spids: [465 468 501 -1] ) (case_arm pat_list: [{<--auto>} {<--remove-all>} {<--display>} {<--config>}] action: [(C {<_installed_alternatives>})] spids: [504 511 517 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMPREPLY) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<compgen>} {<-W>} { (SQ <'--verbose --quiet --help --version\n'> < ' --altdir --admindir --install --remove --auto --display\n' > <' --config --set'> ) } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ) } ] ) } spids: [524] ) ] ) ] spids: [520 521 -1 550] ) ] ) ] ) ) (C {<complete>} {<-F>} {<_update_alternatives>} {<update-alternatives>} {<alternatives>}) ] ) ] )