(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_bold) op: assign_op.Equal rhs: {(DQ <'\x1b[1m'>)} spids: [58] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_italic) op: assign_op.Equal rhs: {(DQ <'\x1b[3m'>)} spids: [63] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_underline) op: assign_op.Equal rhs: {(DQ <'\x1b[4m'>)} spids: [68] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_normal) op: assign_op.Equal rhs: {(DQ <'\x1b[0m'>)} spids: [73] ) ] ) (command.ShFunction name: _Dbg_confirm body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_Pound '$#')} right: {<Id.Lit_Digits 1>} ) right: (arith_expr.Binary op_id: Id.Arith_Great left: {($ Id.VSub_Pound '$#')} right: {<Id.Lit_Digits 2>} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_response) op: assign_op.Equal rhs: {(SQ <error>)} spids: [127] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [101 124] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_confirm_prompt) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [141] ) ] ) (C {<typeset>} {<Id.Lit_VarLike '_Dbg_confirm_default='> (braced_var_sub token: <Id.VSub_Number 2> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{(SQ <no>)}) ) } ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_Colon ':'>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [ {<read>} {($ Id.VSub_DollarName '$_Dbg_edit')} {<-p>} {(DQ ($ Id.VSub_DollarName '$_Dbg_confirm_prompt'))} {<_Dbg_response>} {<args>} ] redirects: [ (redir op: <Id.Redir_LessAnd '<&'> loc: (redir_loc.Fd fd:0) arg: {($ Id.VSub_DollarName '$_Dbg_input_desc')} ) (redir op: <Id.Redir_DGreat '2>>'> loc: (redir_loc.Fd fd:2) arg: {($ Id.VSub_DollarName '$_Dbg_prompt_output')} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [166 194] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$_Dbg_response'))} arms: [ (case_arm pat_list: [ {(SQ <y>)} {(SQ <yes>)} {(SQ <yeah>)} {(SQ <ya>)} {(SQ <ja>)} {(SQ <si>)} {(SQ <oui>)} {(SQ <ok>)} {(SQ <okay>)} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_response) op: assign_op.Equal rhs: {(SQ <y>)} spids: [268] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [213 265 279 -1] ) (case_arm pat_list: [ {(SQ <n>)} {(SQ <no>)} {(SQ <nope>)} {(SQ <nyet>)} {(SQ <nein>)} {(SQ <non>)} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_response) op: assign_op.Equal rhs: {(SQ <n>)} spids: [319] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [282 316 330 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_DollarName '$_Dbg_response')} right: {(SQ <'^[ \\t]*$'>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<set>} {<Id.Lit_Other '+'> <x>}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [337 353] ) ] else_action: [ (C {<_Dbg_msg>} { (DQ <'I don\'t understand '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ($ Id.VSub_DollarName '$_Dbg_response') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.> ) } ) (C {<_Dbg_msg>} {(DQ <'Please try again entering \'yes\' or \'no\'.'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_response) op: assign_op.Equal rhs: {(SQ )} spids: [388] ) ] ) ] ) ] spids: [333 334 396 -1] ) ] ) ] ) ) ] ) ) (command.ShFunction name: _Dbg_errmsg body: (BraceGroup children: [ (C {<typeset>} {<-r>} {<Id.Lit_VarLike 'prefix='> (SQ <'**'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_set_highlight')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_Dbg_msg>} { (DQ ($ Id.VSub_DollarName '$prefix') <' '> (${ Id.VSub_Name _Dbg_ansi_term_underline) ($ Id.VSub_At '$@') (${ Id.VSub_Name _Dbg_ansi_term_normal) ) } ) ] spids: [428 440] ) ] else_action: [ (C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$prefix') <' '> ($ Id.VSub_At '$@'))}) ] ) ] ) ) (command.ShFunction name: _Dbg_errmsg_no_cr body: (BraceGroup children: [ (C {<typeset>} {<-r>} {<Id.Lit_VarLike 'prefix='> (SQ <'**'>)}) (C {<_Dbg_msg_no_cr>} {(DQ ($ Id.VSub_DollarName '$prefix') <' '> ($ Id.VSub_At '$@'))}) ] ) ) (command.ShFunction name: _Dbg_msg body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike _Dbg_logging>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<builtin>} {<echo>} {<-e>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_logfid')} ) ] do_fork: T ) ] spids: [516 527] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: <Id.Lit_ArithVarLike _Dbg_logging_redirect> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {($ Id.VSub_DollarName '$_Dbg_tty')} right: {(SQ <'&1'>)} ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<builtin>} {<echo>} {<-e>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ] do_fork: T ) ] spids: [563 589] ) ] else_action: [(C {<builtin>} {<echo>} {<-e>} {(DQ ($ Id.VSub_At '$@'))})] ) ] spids: [547 560] ) ] ) ] ) ) (command.ShFunction name: _Dbg_msg_nocr body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike _Dbg_logging>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<builtin>} {<echo>} {<-n>} {<-e>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_logfid')} ) ] do_fork: T ) ] spids: [638 649] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: <Id.Lit_ArithVarLike _Dbg_logging_redirect> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<builtin>} {<echo>} {<-n>} {<-e>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ] do_fork: T ) ] spids: [687 699] ) ] else_action: [(C {<builtin>} {<echo>} {<-n>} {<-e>} {(DQ ($ Id.VSub_At '$@'))})] ) ] spids: [671 684] ) ] ) ] ) ) (command.ShFunction name: _Dbg_printf body: (BraceGroup children: [(C {<_Dbg_printf_nocr>} {(DQ ($ Id.VSub_At '$@'))}) (C {<_Dbg_msg>} {(SQ )})] ) ) (command.ShFunction name: _Dbg_printf_nocr body: (BraceGroup children: [ (C {<typeset>} {<Id.Lit_VarLike 'format='> ($ Id.VSub_Number '$1')}) (C {<shift>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike _Dbg_logging>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<builtin>} {<printf>} {(DQ ($ Id.VSub_DollarName '$format'))} {(DQ ($ Id.VSub_At '$@'))} ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_logfid')} ) ] do_fork: T ) ] spids: [786 797] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: <Id.Lit_ArithVarLike _Dbg_logging_redirect> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<builtin>} {<printf>} {(DQ ($ Id.VSub_DollarName '$format'))} {(DQ ($ Id.VSub_At '$@'))} ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$_Dbg_tty')} ) ] do_fork: T ) ] spids: [835 847] ) ] else_action: [ (C {<builtin>} {<printf>} {(DQ ($ Id.VSub_DollarName '$format'))} {(DQ ($ Id.VSub_At '$@'))} ) ] ) ] spids: [819 832] ) ] ) ] ) ) (C {<typeset>} {<Id.Lit_VarLike '_Dbg_dashes='> (SQ <--------------------------------------------------->)} ) (command.ShFunction name: _Dbg_section body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_set_highlight')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_Dbg_msg>} { (DQ (${ Id.VSub_Name _Dbg_ansi_term_bold) ($ Id.VSub_At '$@') (${ Id.VSub_Name _Dbg_ansi_term_normal) ) } ) ] spids: [908 920] ) ] else_action: [ (C {<local>} {<-r>} {<Id.Lit_VarLike 'msg='> (DQ ($ Id.VSub_At '$@'))}) (C {<_Dbg_msg>} { (DQ ($ Id.VSub_DollarName '$msg') <Id.Lit_BadBackslash '\\'> <n> (braced_var_sub token: <Id.VSub_Name _Dbg_dashes> suffix_op: (suffix_op.Slice begin: {<Id.Lit_Digits 0>} length: {(braced_var_sub token:<Id.VSub_Name msg> prefix_op:(Id.VSub_Pound))} ) ) ) } ) ] ) ] ) ) (command.ShFunction name: _Dbg_msg_rst body: (BraceGroup children: [ (C {<local>} {<-r>} {<Id.Lit_VarLike 'msg='> (DQ ($ Id.VSub_At '$@'))}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$_Dbg_set_highlight')} ) ) (command.DParen child: <Id.Lit_ArithVarLike _Dbg_working_term_highlight> ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<typeset>} {<Id.Lit_VarLike 'opts='> (DQ <'--rst --width='> ($ Id.VSub_DollarName '$_Dbg_set_linewidth')) } ) (C {<typeset>} {<Id.Lit_VarLike 'highlight_cmd='> (DQ (${ Id.VSub_Name _Dbg_libdir) <'/lib/term-highlight.py'>) } ) (C {<typeset>} {<formatted_msg>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:formatted_msg) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$msg'))}) (C {($ Id.VSub_DollarName '$highlight_cmd')} {($ Id.VSub_DollarName '$opts')} ) ] negated: F ) ) } spids: [1039] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_QMark '$?')} right: {<Id.Lit_Digits 0>} ) ) (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_n child: {($ Id.VSub_DollarName '$formatted_msg')} ) ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$formatted_msg'))}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [1055 1080] ) ] ) ] spids: [990 1011] ) ] ) (C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$msg'))}) ] ) ) (command.ShFunction name: _Dbg_undefined_cmd body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_Pound '$#')} right: {<Id.Lit_Digits 2>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<_Dbg_errmsg>} { (DQ <'Undefined '> ($ Id.VSub_Number '$1') <' subcommand '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ($ Id.VSub_Number '$2') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'. Try '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <'help '> ($ Id.VSub_Number '$1') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.> ) } ) ] spids: [1118 1133] ) ] else_action: [ (C {<_Dbg_errmsg>} { (DQ <'Undefined command '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ($ Id.VSub_Number '$1') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'. Try '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <help> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.> ) } ) ] ) ] ) ) ] )