(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_bold) op: Equal rhs: {(DQ ('\x1b[1m'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_italic) op: Equal rhs: {(DQ ('\x1b[3m'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_underline) op: Equal rhs: {(DQ ('\x1b[4m'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_ansi_term_normal) op: Equal rhs: {(DQ ('\x1b[0m'))} ) ] ) (command.ShFunction name: _Dbg_confirm body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_DPipe left: (arith_expr.Binary op_id: Arith_Less left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) right: (arith_expr.Binary op_id: Arith_Great left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_response) op: Equal rhs: {(SQ <error>)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_Dbg_confirm_prompt) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(typeset)} {(Lit_VarLike '_Dbg_confirm_default=') (braced_var_sub token: <VSub_Number 2> suffix_op: (suffix_op.Unary op_id:VTest_ColonHyphen arg_word:{(SQ <no>)}) ) } ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(Lit_Other ':')}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [ {(read)} {($ VSub_DollarName '$_Dbg_edit')} {(-p)} {(DQ ($ VSub_DollarName '$_Dbg_confirm_prompt'))} {(_Dbg_response)} {(args)} ] redirects: [ (redir.Redir op: <Redir_LessAnd '<&'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_input_desc')} ) (redir.Redir op: <Redir_DGreat '2>>'> fd: 2 arg_word: {($ VSub_DollarName '$_Dbg_prompt_output')} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Break break>)] ) ] ) (command.Case to_match: {(DQ ($ 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: Equal rhs: {(SQ <y>)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (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: Equal rhs: {(SQ <n>)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_EqualTilde left: {($ VSub_DollarName '$_Dbg_response')} right: {(SQ <'^[ \\t]*$'>)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(KW_Set set)} {(Lit_Other '+') (x)}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] else_action: [ (C {(_Dbg_msg)} { (DQ ("I don't understand ") (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) ($ VSub_DollarName '$_Dbg_response') (word_part.EscapedLiteral token:<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: Equal rhs: {(SQ )} ) ] ) ] ) ] ) ] ) ] ) ) ] ) ) (command.ShFunction name: _Dbg_errmsg body: (command.BraceGroup children: [ (C {(typeset)} {(-r)} {(Lit_VarLike 'prefix=') (SQ <'**'>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_set_highlight')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(_Dbg_msg)} { (DQ ($ VSub_DollarName '$prefix') (' ') (${ VSub_Name _Dbg_ansi_term_underline) ($ VSub_At '$@') (${ VSub_Name _Dbg_ansi_term_normal) ) } ) ] ) ] else_action: [(C {(_Dbg_msg)} {(DQ ($ VSub_DollarName '$prefix') (' ') ($ VSub_At '$@'))})] ) ] ) ) (command.ShFunction name: _Dbg_errmsg_no_cr body: (command.BraceGroup children: [ (C {(typeset)} {(-r)} {(Lit_VarLike 'prefix=') (SQ <'**'>)}) (C {(_Dbg_msg_no_cr)} {(DQ ($ VSub_DollarName '$prefix') (' ') ($ VSub_At '$@'))}) ] ) ) (command.ShFunction name: _Dbg_msg body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token:<Lit_ArithVarLike _Dbg_logging>) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(builtin)} {(echo)} {(-e)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_logfid')} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Arith_Bang child: (arith_expr.VarRef token: <Lit_ArithVarLike _Dbg_logging_redirect> ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_tty')} ) ) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobNEqual left: {($ VSub_DollarName '$_Dbg_tty')} right: {(SQ <'&1'>)} ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(builtin)} {(echo)} {(-e)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_tty')} ) ] ) ] ) ] else_action: [(C {(builtin)} {(echo)} {(-e)} {(DQ ($ VSub_At '$@'))})] ) ] ) ] ) ] ) ) (command.ShFunction name: _Dbg_msg_nocr body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token:<Lit_ArithVarLike _Dbg_logging>) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(builtin)} {(echo)} {(-n)} {(-e)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_logfid')} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Arith_Bang child: (arith_expr.VarRef token: <Lit_ArithVarLike _Dbg_logging_redirect> ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_tty')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(builtin)} {(echo)} {(-n)} {(-e)} {(DQ ($ VSub_At '$@'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_tty')} ) ] ) ] ) ] else_action: [(C {(builtin)} {(echo)} {(-n)} {(-e)} {(DQ ($ VSub_At '$@'))})] ) ] ) ] ) ] ) ) (command.ShFunction name: _Dbg_printf body: (command.BraceGroup children: [(C {(_Dbg_printf_nocr)} {(DQ ($ VSub_At '$@'))}) (C {(_Dbg_msg)} {(SQ )})] ) ) (command.ShFunction name: _Dbg_printf_nocr body: (command.BraceGroup children: [ (C {(typeset)} {(Lit_VarLike 'format=') ($ VSub_Number '$1')}) (C {(shift)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token:<Lit_ArithVarLike _Dbg_logging>) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(builtin)} {(printf)} {(DQ ($ VSub_DollarName '$format'))} {(DQ ($ VSub_At '$@'))} ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_logfid')} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Arith_Bang child: (arith_expr.VarRef token: <Lit_ArithVarLike _Dbg_logging_redirect> ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_tty')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(builtin)} {(printf)} {(DQ ($ VSub_DollarName '$format'))} {(DQ ($ VSub_At '$@'))} ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {($ VSub_DollarName '$_Dbg_tty')} ) ] ) ] ) ] else_action: [ (C {(builtin)} {(printf)} {(DQ ($ VSub_DollarName '$format'))} {(DQ ($ VSub_At '$@'))} ) ] ) ] ) ] ) ] ) ) (C {(typeset)} {(Lit_VarLike '_Dbg_dashes=') (SQ <--------------------------------------------------->)} ) (command.ShFunction name: _Dbg_section body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_set_highlight')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(_Dbg_msg)} { (DQ (${ VSub_Name _Dbg_ansi_term_bold) ($ VSub_At '$@') (${ VSub_Name _Dbg_ansi_term_normal) ) } ) ] ) ] else_action: [ (C {(local)} {(-r)} {(Lit_VarLike 'msg=') (DQ ($ VSub_At '$@'))}) (C {(_Dbg_msg)} { (DQ ($ VSub_DollarName '$msg') (Lit_Other '\\') (n) (braced_var_sub token: <VSub_Name _Dbg_dashes> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w: {(braced_var_sub token:<VSub_Name msg> prefix_op:VSub_Pound)} ) ) ) ) } ) ] ) ] ) ) (command.ShFunction name: _Dbg_msg_rst body: (command.BraceGroup children: [ (C {(local)} {(-r)} {(Lit_VarLike 'msg=') (DQ ($ VSub_At '$@'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$_Dbg_set_highlight')} ) ) (command.DParen child: (arith_expr.VarRef token: <Lit_ArithVarLike _Dbg_working_term_highlight> ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(typeset)} {(Lit_VarLike 'opts=') (DQ ('--rst --width=') ($ VSub_DollarName '$_Dbg_set_linewidth')) } ) (C {(typeset)} {(Lit_VarLike 'highlight_cmd=') (DQ (${ 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: Equal rhs: { (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$msg'))}) (C {($ VSub_DollarName '$highlight_cmd')} {($ VSub_DollarName '$opts')} ) ] negated: F ) ] ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Arith_DEqual left: (arith_expr.ArithWord w:{($ VSub_QMark '$?')}) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {($ VSub_DollarName '$formatted_msg')} ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(_Dbg_msg)} {(DQ ($ VSub_DollarName '$formatted_msg'))}) (command.ControlFlow token: <ControlFlow_Return return> ) ] ) ] ) ] ) ] ) (C {(_Dbg_msg)} {(DQ ($ VSub_DollarName '$msg'))}) ] ) ) (command.ShFunction name: _Dbg_undefined_cmd body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Arith_DEqual left: (arith_expr.ArithWord w:{($ VSub_Pound '$#')}) right: (arith_expr.ArithWord w:{(Lit_Digits 2)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(_Dbg_errmsg)} { (DQ ('Undefined ') ($ VSub_Number '$1') (' subcommand ') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) ($ VSub_Number '$2') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ('. Try ') (word_part.EscapedLiteral token: <Lit_EscapedChar '\\"'> ) ('help ') ($ VSub_Number '$1') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (.) ) } ) ] ) ] else_action: [ (C {(_Dbg_errmsg)} { (DQ ('Undefined command ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ($ VSub_Number '$1') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ('. Try ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (help) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) (.) ) } ) ] ) ] ) ) ] )