(command.AndOr ops: [Op_DAmp] children: [ (command.FuncDef name: _invoke_rc_d body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cur spids:[19]) op: Equal spids: [19] ) (assign_pair lhs: (lhs_expr.LhsName name:prev spids:[21]) op: Equal spids: [21] ) (assign_pair lhs: (lhs_expr.LhsName name:words spids:[23]) op: Equal spids: [23] ) (assign_pair lhs: (lhs_expr.LhsName name:cword spids:[25]) op: Equal spids: [25] ) ] spids: [17] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(_init_completion)}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sysvdir spids:[38]) op: Equal spids: [38] ) (assign_pair lhs: (lhs_expr.LhsName name:services spids:[40]) op: Equal spids: [40] ) (assign_pair lhs: (lhs_expr.LhsName name:options spids:[42]) op: Equal spids: [42] ) (assign_pair lhs: (lhs_expr.LhsName name:valid_options spids:[44]) op: Equal spids: [44] ) ] spids: [36] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (command.DBracket expr: (bool_expr.BoolUnary op_id:BoolUnary_d child:{(/etc/rc.d/init.d)}) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sysvdir spids:[58]) op: Equal rhs: {(/etc/rc.d/init.d)} spids: [58] ) ] spids: [58] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sysvdir spids:[65]) op: Equal rhs: {(/etc/init.d)} spids: [65] ) ] spids: [65] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:services spids:[70]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(printf)} {(SQ <'%s '>)} {($ VSub_DollarName '$sysvdir') (/) (word_part.ExtGlobPart op: <ExtGlob_Bang '!('> arms: [ {(README) (Lit_Other '*')} {(Lit_Other '*') (.sh)} {($ VSub_DollarName '$_backup_glob')} ] spids: [83 91] ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [73 93] ) } ] ) } spids: [70] ) ] spids: [70] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:services spids:[98]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.BracedVarSub token: <VSub_Name services> bracket_op: (bracket_op.WholeArray op_id:Lit_At) suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {($ VSub_DollarName '$sysvdir') (Lit_Slash /)} ) spids: [101 109] ) } ] ) } spids: [98] ) ] spids: [98] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:options spids:[114]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ {(--help)} {(--quiet)} {(--force)} {(--try-anyway)} {(--disclose-deny)} {(--query)} {(--no-fallback)} ] ) } spids: [114] ) ] spids: [114] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.BoolBinary op_id: BoolBinary_eq left: {($ VSub_DollarName '$cword')} right: {(1)} ) right: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$prev'))} right: {(--) (Lit_Other '*')} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:valid_options spids:[169]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.SimpleCommand words: [{(tr)} {(DQ (' '))} {(DQ (Lit_Other '\\') (n))}] redirects: [ (redir.Redir op: <Redir_TLess '<<<'> fd: 16777215 arg_word: { (DQ (word_part.BracedVarSub token: <VSub_Name words> bracket_op: (bracket_op.WholeArray op_id: Lit_At ) spids: [189 194] ) (' ') (word_part.BracedVarSub token: <VSub_Name options> bracket_op: (bracket_op.WholeArray op_id: Lit_At ) spids: [196 201] ) ) } ) ] ) (C {(sed)} {(-ne)} { (DQ (/) (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [ {(sed)} { (DQ ('s/ /') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\\\'> ) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>) ('|/g') ) } ] redirects: [ (redir.Redir op: <Redir_TLess '<<<'> fd: 16777215 arg_word: { (DQ (word_part.BracedVarSub token: <VSub_Name options> bracket_op: (bracket_op.WholeArray op_id: Lit_At ) spids: [227 232] ) ) } ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [214 235] ) (/p) ) } ) (C {(sort)}) (C {(uniq)} {(-u)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [172 253] ) } ] ) } spids: [169] ) ] spids: [169] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[258]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} {(SQ <'${valid_options[@]} ${services[@]}'>)} {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [261 277] ) } ] ) } spids: [258] ) ] spids: [258] ) ] spids: [16777215 166] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolUnary op_id: BoolUnary_x child: {($ VSub_DollarName '$sysvdir') (/) ($ VSub_DollarName '$prev')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[298]) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ <'`sed -e "y/|/ /" \\\n'> < ' -ne "s/^.*Usage:[ ]*[^ ]*[ ]*{*\\([^}\\"]*\\).*$/\\1/p" \\\n' > <' $sysvdir/$prev`'> ) } {(--)} {(DQ ($ VSub_DollarName '$cur'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [301 319] ) } ] ) } spids: [298] ) ] spids: [298] ) ] spids: [282 295] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMPREPLY spids:[327]) op: Equal rhs: {(word_part.ArrayLiteralPart)} spids: [327] ) ] spids: [327] ) ] spids: [324 332] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [14] ) spids: [10 13] ) (C {(complete)} {(-F)} {(_invoke_rc_d)} {(invoke-rc.d)}) ] )