(command.CommandList children: [ (command.ShFunction name: _Dbg_set_onoff body: (BraceGroup children: [ (C {<typeset>} {<Id.Lit_VarLike 'onoff='> (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{(SQ <off>)}) ) } ) (C {<typeset>} {<Id.Lit_VarLike 'cmdname='> ($ Id.VSub_Number '$2')}) (command.Case to_match: {($ Id.VSub_DollarName '$onoff')} arms: [ (case_arm pat_list: [{<on>} {<1>}] action: [ (C {<_Dbg_write_journal_eval>} {(DQ <_Dbg_set_> (${ Id.VSub_Name cmdname) <'=1'>)}) ] spids: [91 97 112 -1] ) (case_arm pat_list: [{<off>} {<0>}] action: [ (C {<_Dbg_write_journal_eval>} {(DQ <_Dbg_set_> (${ Id.VSub_Name cmdname) <'=0'>)}) ] spids: [115 121 135 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<_Dbg_msg>} { (DQ (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <on> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <' or '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <off> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <' expected.'> ) } ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [138 140 -1 162] ) ] ) (C {<_Dbg_do_show>} {($ Id.VSub_DollarName '$cmdname')}) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: _Dbg_show_onoff body: (BraceGroup children: [ (C {<typeset>} {<Id.Lit_VarLike 'cmd='> (DQ ($ Id.VSub_Number '$1'))}) (C {<typeset>} {<Id.Lit_VarLike 'msg='> (DQ ($ Id.VSub_Number '$2'))}) (C {<typeset>} {<Id.Lit_VarLike 'label='> (DQ ($ Id.VSub_Number '$3'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_DollarName '$label')}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:label) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(DQ <'%-12s: '>)} {($ Id.VSub_DollarName '$subcmd')}) ) } spids: [218] ) ] ) ] ) (C {<typeset>} {<Id.Lit_VarLike 'onoff='> (SQ <off.>)}) (C {<typeset>} {<value>}) (C {<eval>} { (DQ <'value='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <_Dbg_set_> (${ Id.VSub_Name cmd) ) } ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child:<Id.Lit_ArithVarLike value>) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:onoff) op: assign_op.Equal rhs: {(SQ <on.>)} spids: [264] ) ] ) ] ) (C {<_Dbg_msg>} {(DQ (${ Id.VSub_Name label) ($ Id.VSub_DollarName '$msg') <' is'>)} {($ Id.VSub_DollarName '$onoff')} ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: _Dbg_help_set_onoff body: (BraceGroup children: [ (C {<typeset>} {<Id.Lit_VarLike 'subcmd='> (DQ ($ Id.VSub_Number '$1'))}) (C {<typeset>} {<Id.Lit_VarLike 'label='> (DQ ($ Id.VSub_Number '$2'))}) (C {<typeset>} {<Id.Lit_VarLike 'msg='> (DQ ($ Id.VSub_Number '$3'))}) (C {<typeset>} {<-i>} {<variable_value>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:eval_cmd) op: assign_op.Equal rhs: { (DQ <'variable_value='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'{_Dbg_set_'> ($ Id.VSub_DollarName '$subcmd') <'}'> ) } spids: [330] ) ] ) (C {<eval>} {($ Id.VSub_DollarName '$eval_cmd')}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_DollarName '$label')}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:label) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<builtin>} {<printf>} {(DQ <'set %-12s-- '>)} {($ Id.VSub_DollarName '$subcmd')} ) ) } spids: [355] ) ] ) ] ) (C {<typeset>} {<Id.Lit_VarLike 'onoff='> (DQ <off.>)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: <Id.Lit_ArithVarLike variable_value> right: {<Id.Lit_Digits 0>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:onoff) op: assign_op.Equal rhs: {(SQ <on.>)} spids: [390] ) ] ) ] ) (C {<_Dbg_msg>} {(DQ (${ Id.VSub_Name label) (${ Id.VSub_Name msg) <' is'>)} {($ Id.VSub_DollarName '$onoff')} ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) } right: {($ Id.VSub_Number '$0')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShFunction name: _Dbg_msg body: (BraceGroup children:[(C {<echo>} {($ Id.VSub_Star '$*')})]) ) (C {<typeset>} {<-i>} {<_Dbg_foo>}) (command.ForEach iter_name: i iter_words: [{<0>} {<1>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_foo) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [485] ) ] ) (C {<_Dbg_help_set_onoff>} {(DQ <foo>)} {(DQ <foo>)} {(DQ <'Set short xx'>)}) (C {<typeset>} {<-p>} {<_Dbg_set_foo>}) ] ) ) ] spids: [423 442] ) ] ) ] )