(command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShFunction name: _iptables body: (command.BraceGroup children: [ (C {(local)} {(cur)} {(prev)} {(words)} {(cword)} {(split)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(_init_completion)} {(-s)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:30) ) ] ) (C {(local)} {(table)} {(Id.Lit_VarLike 'chain=') (SQ (Token id:Id.Lit_Chars val:'s/^Chain \\([^ ]\\{1,\\}\\).*$/\\1/p' span_id:40)) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: (Token id:Id.VSub_Name val:words span_id:50) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {(Id.Lit_Other '*') (Id.BoolUnary_t -t) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\ ' span_id:60) ) (Id.Lit_Other '*') (filter) (Id.Lit_Other '*') } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:66) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:table) op: assign_op.Equal rhs: {(DQ ('-t filter'))} spids: [71] ) ] ) ] spids: [45 68] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: (Token id:Id.VSub_Name val:words span_id:82) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {(Id.Lit_Other '*') (Id.BoolUnary_t -t) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\ ' span_id:92) ) (Id.Lit_Other '*') (nat) (Id.Lit_Other '*') } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:98) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:table) op: assign_op.Equal rhs: {(DQ ('-t nat'))} spids: [103] ) ] ) ] spids: [77 100] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: (Token id:Id.VSub_Name val:words span_id:114) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } right: {(Id.Lit_Other '*') (Id.BoolUnary_t -t) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\ ' span_id:124) ) (Id.Lit_Other '*') (mangle) (Id.Lit_Other '*') } ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:130) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:table) op: assign_op.Equal rhs: {(DQ ('-t mangle'))} spids: [135] ) ] ) ] spids: [109 132] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$prev')} arms: [ (case_arm pat_list: [ {(-) (Id.Lit_Star '*') (Id.Lit_LBracket '[') (AIDRPFXLZ) (Id.Lit_RBracket ']')} ] 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:161) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:163) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '`iptables $table -nL | \\\n' span_id: 170 ) (Token id: Id.Lit_Chars val: ' sed -ne "s/^Chain \\([^ ]\\{1,\\}\\).*$/\\1/p"`' span_id: 171 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [160] ) ] ) ] spids: [152 157 185 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*') (t)}] 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:195) words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:197) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: 'nat filter mangle' span_id: 204 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [194] ) ] ) ] spids: [188 191 218 -1] ) (case_arm pat_list: [{(-j)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$table'))} right: {(DQ ('-t filter'))} ) right: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ ($ Id.VSub_DollarName '$table'))} ) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:248) ) ] 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:254) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 256 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: 'ACCEPT DROP LOG ULOG REJECT\n' span_id: 263 ) (Token id: Id.Lit_Chars val: ' `iptables $table -nL | sed -ne "$chain" \\\n' span_id: 264 ) (Token id: Id.Lit_Chars val: ' -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' span_id: 265 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [253] ) ] ) ] spids: [225 250] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$table')} right: {(DQ ('-t nat'))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:294) ) ] 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:300) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 302 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: 'ACCEPT DROP LOG ULOG REJECT MIRROR SNAT\n' span_id: 309 ) (Token id:Id.Lit_Chars val:' DNAT MASQUERADE `iptables $table -nL | \\\n' span_id:310) (Token id: Id.Lit_Chars val: ' sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' span_id: 311 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [299] ) ] ) ] spids: [281 296] ) (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$table')} right: {(DQ ('-t mangle'))} ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:340) ) ] 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:346) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 348 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: 'ACCEPT DROP LOG ULOG REJECT MARK TOS\n' span_id: 355 ) (Token id: Id.Lit_Chars val: ' `iptables $table -nL | sed -ne "$chain" \\\n' span_id: 356 ) (Token id: Id.Lit_Chars val: ' -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' span_id: 357 ) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [345] ) ] ) ] spids: [327 342] ) ] ) ] spids: [221 222 376 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (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:397) ) ] 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:403) words: [ { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 405 ) command_list: (command.CommandList children: [ (C {(compgen)} {(-W)} { (SQ (Token id: Id.Lit_Chars val: '--in-interface --out-interface --source\n' span_id: 412 ) (Token id: Id.Lit_Chars val: ' --destination --protocol --fragment --match --append --delete\n' span_id: 413 ) (Token id: Id.Lit_Chars val: ' --insert --replace --list --flush --zero --new --delete-chain\n' span_id: 414 ) (Token id: Id.Lit_Chars val: ' --policy --rename-chain --proto --source --destination\n' span_id: 415 ) (Token id: Id.Lit_Chars val: ' --in-interface --jump --match --numeric --out-interface --table\n' span_id: 416 ) (Token id: Id.Lit_Chars val: ' --verbose --line-numbers --exact --fragment --modprobe\n' span_id: 417 ) (Token id:Id.Lit_Chars val:' --set-counters --version' span_id:418) ) } {(--)} {(DQ ($ Id.VSub_DollarName '$cur'))} ) ] ) ) } ] ) } spids: [402] ) ] ) ] spids: [383 399] ) ] ) ] spids: [379 380 435 -1] ) ] ) ] ) ) (C {(complete)} {(-F)} {(_iptables)} {(iptables)}) ] )