(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_Number '$0')}
                          right: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name BASH_SOURCE>
                                bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                              )
                            }
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dirname)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name BASH_SOURCE>
                        bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VOp1_Percent '%'>
                            arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
                          )
                      )
                    }
                  spids: [83]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_DollarName '$dirname')}
                      right: {($ Id.VSub_Number '$0')}
                    )
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:top_dir)
                      op: assign_op.Equal
                      rhs: {(SQ <..>)}
                      spids: [107]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:top_dir)
                      op: assign_op.Equal
                      rhs: {(${ Id.VSub_Name dirname) <'/..'>}
                      spids: [114]
                    )
                  ]
                )
              ]
            )
            (command.ForEach
              iter_name: lib_file
              iter_words: [{<help>} {<alias>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Sentence
                      child: 
                        (C {<source>} 
                          {($ Id.VSub_DollarName '$top_dir') <'/lib/'> (${ Id.VSub_Name lib_file) <.sh>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
            )
          ]
          spids: [61 80]
        )
      ]
    )
    (C {<_Dbg_help_add>} {(SQ <examine>)} 
      {
        (DQ <'**examine** *expr*\n'> <'\n'> <'Print value of an expression via '> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <typeset> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <', '> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <let> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <', and failing these,\n'> 
          (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <eval> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'.\n'> <'\n'> 
          <'To see the structure of a variable do not prepeand a leading '> <Id.Lit_Dollar '$'> <'.\n'> <'\n'> <'Arithmetic expressions also do not need leading '> 
          <Id.Lit_Dollar '$'> <' for\n'> <'their value is to be substituted.\n'> <'\n'> 
          <'However if *expr* falls into neither these, categories variables\n'> <'witih *expr* need '> <Id.Lit_Dollar '$'> <' to have their value substituted.\n'> <'\n'> <'Examples:\n'> 
          <'---------\n'> <'\n'> <'   # code:\n'> <'   # typeset -a typeset -a x=(2 3 4)\n'> <'   # typeset -ir p=1\n'> 
          <'   bashdb<1> examine x   # note no '> <Id.Lit_Dollar '$'> <'\n'> <'   declare -a x=\'([0]='>
        ) <2> (DQ <' [1]='>) <3> (DQ <' [2]='>) <4> 
        (DQ <')\'\n'> <'   bashdb<2> examine '> ($ Id.VSub_DollarName '$x') <'  # note with '> 
          <Id.Lit_Dollar '$'> <'\n'> <'   1  # because this is how bash evaluates '> ($ Id.VSub_DollarName '$x') <'\n'> 
          <'   bashdb<3> x p\n'> <'   declare -ir p='>
        ) <1> 
        (DQ <'\n'> <'   bashdb<3> x p+2\n'> <'   3\n'> <'   bashdb<3> x '> ($ Id.VSub_DollarName '$p') 
          <'+2\n'> <'   3\n'> <'\n'> <'See also:\n'> <'---------\n'> <'\n'> <'**eval** and **pr**.'>
        )
      }
    )
    (command.ShFunction
      name: _Dbg_do_examine
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<-r>} 
              {<Id.Lit_VarLike '_Dbg_expr='> 
                (braced_var_sub
                  token: <Id.VSub_At '@'>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: {(DQ ($ Id.VSub_DollarName '$_Dbg_last_x_args'))}
                    )
                )
              }
            )
            (C {<typeset>} {<_Dbg_result>})
            (C {<typeset>} {<Id.Lit_VarLike 'isblank='> ($ Id.VSub_DollarName '$_Dbg_expr')})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_z
                                  child: {($ Id.VSub_DollarName '$isblank')}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$_Dbg_expr'))})]
                  spids: [270 282]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<_Dbg_defined>} {($ Id.VSub_DollarName '$_Dbg_expr')})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_Dbg_result)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<typeset>} {<-p>} {($ Id.VSub_DollarName '$_Dbg_expr')})
                              )
                            }
                          spids: [303]
                        )
                      ]
                    )
                    (C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$_Dbg_result'))})
                  ]
                  spids: [292 300]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<_Dbg_is_function>} {(DQ ($ Id.VSub_DollarName '$_Dbg_expr'))} 
                              {($ Id.VSub_DollarName '$_Dbg_set_debug')}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:_Dbg_result)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<typeset>} {<-f>} {($ Id.VSub_DollarName '$_Dbg_expr')})
                              )
                            }
                          spids: [334]
                        )
                      ]
                    )
                    (C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$_Dbg_result'))})
                  ]
                  spids: [320 331]
                )
              ]
              else_action: [
                (C {<typeset>} {<-i>} {<_Dbg_rc>})
                (command.Sentence
                  child: 
                    (command.Simple
                      words: [
                        {<eval>}
                        {<let>}
                        {<Id.Lit_VarLike '_Dbg_result='> ($ Id.VSub_DollarName '$_Dbg_expr')}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '2>'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:_Dbg_rc)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '$?')}
                      spids: [372]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DParen
                                  child: 
                                    (arith_expr.Binary
                                      op_id: Id.Arith_NEqual
                                      left: <Id.Lit_ArithVarLike _Dbg_rc>
                                      right: {<Id.Lit_Digits 0>}
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [(C {<_Dbg_do_print>} {(DQ ($ Id.VSub_DollarName '$_Dbg_expr'))})]
                      spids: [376 391]
                    )
                  ]
                  else_action: [(C {<_Dbg_msg>} {(DQ ($ Id.VSub_DollarName '$_Dbg_result'))})]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_last_x_args)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName '$_Dbg_x_args'))}
                  spids: [417]
                )
              ]
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
        )
    )
    (C {<_Dbg_alias_add>} {(SQ <x>)} {(SQ <examine>)})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_Number '$0')}
                          right: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name BASH_SOURCE>
                                bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                              )
                            }
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ForEach
              iter_name: _Dbg_file
              iter_words: [{<fns>} {<msg>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<source>} 
                      {($ Id.VSub_DollarName '$top_dir') <'/lib/'> (${ Id.VSub_Name _Dbg_file) <.sh>}
                    )
                  ]
                )
            )
            (C {<source>} {($ Id.VSub_DollarName '$top_dir') <'/command/help.sh'>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_args)
                  op: assign_op.Equal
                  rhs: {(SQ <examine>)}
                  spids: [500]
                )
              ]
            )
            (C {<_Dbg_do_help>} {<x>})
            (C {<_Dbg_do_examine>} {<top_dir>})
          ]
          spids: [444 463]
        )
      ]
    )
  ]
)