# -*- shell-script -*- # "show editing" debugger command # # Copyright (C) 2010, 2011 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show editing \ "Show editing of command lines as they are typed" 1 proc _Dbg_do_show_editing { typeset label="$1" [[ -n $label ]] && global label := $[_Dbg_printf_nocr "%-12s: " editing] _Dbg_msg_nocr \ "$(label)Editing of command lines as they are typed is " if [[ -z $_Dbg_edit ]] { _Dbg_msg 'off.' } else { _Dbg_msg 'on.' _Dbg_msg \ " Edit style is $_Dbg_edit_style." } return 0 } (CommandList children: [ (C {(_Dbg_help_add_sub)} {(show)} {(editing)} {(DQ ("Show editing of command lines as they are typed"))} {(1)} ) (FuncDef name: _Dbg_do_show_editing body: (BraceGroup children: [ (C {(typeset)} {(Lit_VarLike "label=") (DQ ($ VSub_Number "$1"))}) (AndOr children: [ (DBracket expr: (BoolUnary op_id:BoolUnary_n child:{($ VSub_Name "$label")}) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:label) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(_Dbg_printf_nocr)} {(DQ ("%-12s: "))} {(editing)})] ) left_token: spids: [98 106] ) } spids: [97] ) ] spids: [97] ) ] op_id: Op_DAmp ) (C {(_Dbg_msg_nocr)} {(DQ (${ VSub_Name label) ("Editing of command lines as they are typed is "))} ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_z child:{($ VSub_Name "$_Dbg_edit")}) ) terminator: ) ] action: [(C {(_Dbg_msg)} {(SQ )})] spids: [-1 133] ) ] else_action: [ (C {(_Dbg_msg)} {(SQ )}) (C {(_Dbg_msg)} {(DQ (" Edit style is ") ($ VSub_Name "$_Dbg_edit_style") (.))}) ] spids: [143 164] ) (ControlFlow token: arg_word:{(0)}) ] spids: [76] ) spids: [72 75] ) ] )