processor/command/set_subcmd/hidelevel.rb in trepanning-0.0.9 vs processor/command/set_subcmd/hidelevel.rb in trepanning-0.1.0
- old
+ new
@@ -1,13 +1,14 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
+# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
require_relative '../base/subcmd'
class Trepan::Subcommand::SetHidelevel < Trepan::Subcommand
unless defined?(HELP)
+ Trepanning::Subcommand.set_name_prefix(__FILE__, self)
HELP = "
-set hidelevel [NUM]
+#{PREFIX.join(' ')} [NUM]
Hide this many stack frames from the bottom (or least-recent) frame.
Often the bottom-most frames are setup frames that one doesn't think
of as being part of one's program but are part of the overhead loading
@@ -19,22 +20,20 @@
than the current number of entries in the stack, i.e. the stack shown
would be otherwise be, empty then we show all entries, or take NUM to
be 0.
Examples:
- set hidelevel # Use the default value and hide 'uninteresting' ones
- set hidelevel 0 # Show all stack entries, even from loading the program
+ #{PREFIX.join(' ')} # Use the default value and hide 'uninteresting' ones
+ #{PREFIX.join(' ')} 0 # Show all stack entries, even from loading the program
# or initial stack entries the debugger created to
# debug the program.
- set hidelevel 1 # Hide only the bottom-most or least-recent stack frame.
+ #{PREFIX.join(' ')} 1 # Hide only the bottom-most or least-recent stack frame.
See also 'backtrace' and 'show hidelevel'.
."
IN_LIST = true
MIN_ABBREV = 'hide'.size
- NAME = File.basename(__FILE__, '.rb')
- PREFIX = %W(set #{NAME})
SHORT_HELP = "Set the number of bottom frames to hide."
end
def run(args)
if args.size == 2