(CommandList children: [ (AndOr ops: [Op_DAmp] children: [ (FuncDef name: _update_rc_d body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LhsName name:cur) op:Equal spids:[19]) (assign_pair lhs:(LhsName name:prev) op:Equal spids:[21]) (assign_pair lhs:(LhsName name:words) op:Equal spids:[23]) (assign_pair lhs:(LhsName name:cword) op:Equal spids:[25]) ] spids: [17] ) (AndOr ops: [Op_DPipe] children: [(C {(_init_completion)}) (ControlFlow token:<ControlFlow_Return return>)] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LhsName name:sysvdir) op:Equal spids:[38]) (assign_pair lhs:(LhsName name:services) op:Equal spids:[40]) (assign_pair lhs:(LhsName name:options) op:Equal spids:[42]) (assign_pair lhs: (LhsName name:valid_options) op: Equal spids: [44] ) ] spids: [36] ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (DBracket expr: (BoolUnary op_id:BoolUnary_d child:{(/etc/rc.d/init.d)}) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sysvdir) op: Equal rhs: {(/etc/rc.d/init.d)} spids: [58] ) ] spids: [58] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sysvdir) op: Equal rhs: {(/etc/init.d)} spids: [65] ) ] spids: [65] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:services) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(printf)} {(SQ <'%s '>)} {($ VSub_Name '$sysvdir') (/) (ExtGlobPart op: <ExtGlob_Bang '!('> spids: [82 90] ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [73 91] ) } ] ) } spids: [70] ) ] spids: [70] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:services) op: Equal rhs: { (ArrayLiteralPart words: [ { (BracedVarSub token: <VSub_Name services> bracket_op: (WholeArray op_id:Lit_At) suffix_op: (StringUnary op_id: VOp1_Pound arg_word: {($ VSub_Name '$sysvdir') (Lit_Slash /)} ) spids: [99 107] ) } ] ) } spids: [96] ) ] spids: [96] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:options) op: Equal rhs: {(ArrayLiteralPart words:[{(-f)} {(-n)}])} spids: [112] ) ] spids: [112] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolBinary op_id: BoolBinary_eq left: {($ VSub_Name '$cword')} right: {(1)} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(-) (Lit_Other '*')} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:valid_options) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [ {(tr)} {(DQ (' '))} {(DQ (Lit_Other '\\') (n))} ] redirects: [ (Redir op_id: Redir_TLess fd: 16777215 arg_word: { (DQ (BracedVarSub token: <VSub_Name words> bracket_op: (WholeArray op_id: Lit_At ) spids: [170 175] ) (' ') (BracedVarSub token:<VSub_Name options> bracket_op:(WholeArray op_id:Lit_At) spids:[177 182]) ) } spids: [168] ) ] ) (C {(sed)} {(-ne)} { (DQ (/) (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(sed)} { (DQ ('s/ /') (EscapedLiteralPart token: <Lit_EscapedChar '\\\\' > ) ('|/g') ) } ] redirects: [ (Redir op_id: Redir_TLess fd: 16777215 arg_word: { (DQ (BracedVarSub token: <VSub_Name options > bracket_op: (WholeArray op_id: Lit_At ) spids: [207 212] ) ) } spids: [205] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [195 215] ) (/p) ) } ) (C {(sort)}) (C {(uniq)} {(-u)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [153 233] ) } ] ) } spids: [150] ) ] spids: [150] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'${options[@]} ${services[@]}'>)} {(-X)} {(SQ <'$( tr " " "|" <<<${words[@]} )'>)} {(--)} {(DQ ($ VSub_Name '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [241 265] ) } ] ) } spids: [238] ) ] spids: [238] ) ] spids: [16777215 147] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(ExtGlobPart op:<ExtGlob_QMark '?('> spids:[280 302])} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'remove defaults start stop'>)} {(--)} {(DQ ($ VSub_Name '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [313 329] ) } ] ) } spids: [310] ) ] spids: [310] ) ] spids: [270 307] ) (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(defaults)} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$cur'))} right: {(Lit_Other '[') (0-9) (Lit_Other ']')} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [{(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)}] ) } spids: [364] ) ] spids: [364] ) ] spids: [334 361] ) (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(defaults)} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$cur'))} right: {(Lit_Other '[') (sk) (Lit_Other ']') (ExtGlobPart op: <ExtGlob_QMark '?('> spids: [413 415] ) } ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [{(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)}] ) } spids: [423] ) ] spids: [423] ) ] spids: [390 420] ) (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(defaults)} ) right: (BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Name '$cur'))}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [ {(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)} {(s)} {(k)} ] ) } spids: [475] ) ] spids: [475] ) ] spids: [449 472] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(ExtGlobPart op:<ExtGlob_QMark '?('> spids:[515 519])} ) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$cur'))} right: {(Lit_Other '[') (0-9) (Lit_Other ']')} ) right: (BoolUnary op_id: BoolUnary_z child: {(DQ ($ VSub_Name '$cur'))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [{(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)}] ) } spids: [555] ) ] spids: [555] ) ] spids: [16777215 552] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$cur'))} right: {(Lit_Other '[') (0-9) (Lit_Other ']') (Lit_Other '[') (0-9) (Lit_Other ']') } ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart words:[{($ VSub_Name '$cur')}])} spids: [604] ) ] spids: [604] ) ] spids: [581 601] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart)} spids: [615] ) ] spids: [615] ) ] spids: [612 620] ) ] spids: [505 524] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(ExtGlobPart op:<ExtGlob_QMark '?('> spids:[633 637])} ) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: {(DQ ($ VSub_Name '$cur'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name '$prev')} right: {(Lit_Other '[') (0-9) (Lit_Other ']') (Lit_Other '[') (0-9) (Lit_Other ']') } ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [{(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(S)}] ) } spids: [682] ) ] spids: [682] ) ] spids: [16777215 679] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [{(0)} {(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(S)} {(.)}] ) } spids: [707] ) ] spids: [707] ) ] spids: [704 731] ) ] spids: [16777215 658] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$cur'))} right: {(Lit_Other '[') (0-6S.) (Lit_Other ']')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart words:[{($ VSub_Name '$cur')}])} spids: [754] ) ] spids: [754] ) ] spids: [734 751] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart)} spids: [765] ) ] spids: [765] ) ] spids: [762 770] ) ] spids: [623 642] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$prev'))} right: {(DQ (.))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: { (ArrayLiteralPart words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(compgen)} {(-W)} {(DQ ('start stop'))} {(--)} {(DQ ($ VSub_Name '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [796 812] ) } ] ) } spids: [793] ) ] spids: [793] ) ] spids: [773 790] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPREPLY) op: Equal rhs: {(ArrayLiteralPart)} spids: [820] ) ] spids: [820] ) ] spids: [817 825] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [14] ) spids: [10 13] ) (C {(complete)} {(-F)} {(_update_rc_d)} {(update-rc.d)}) ] ) ] )