lib/byebug/commands/show.rb in byebug-1.0.3 vs lib/byebug/commands/show.rb in byebug-1.1.0
- old
+ new
@@ -116,11 +116,11 @@
"Byebug history size is #{interface.history_length}"
s << msg
end
return s.join("\n")
when /^linetrace$/
- on_off = Byebug.tracing
+ on_off = Byebug.tracing?
return "line tracing is #{show_onoff(on_off)}."
when /^linetrace\+$/
on_off = Command.settings[:tracing_plus]
if on_off
return "line tracing style is different consecutive lines."
@@ -136,11 +136,11 @@
on_off = Command.settings[:stack_trace_on_error]
return "Displaying stack trace is #{show_onoff(on_off)}."
when /^version$/
return "byebug #{Byebug::VERSION}"
when /^width$/
- return "width is #{self.class.settings[:width]}."
+ return "width is #{Command.settings[:width]}."
else
return "Unknown show subcommand #{setting_name}."
end
end
end
@@ -200,11 +200,11 @@
/^show (?: \s+ (.+) )?$/xi
end
def execute
if not @match[1]
- print_subcmds(Subcommands)
+ print format_subcmds(Subcommands)
else
args = @match[1].split(/[ \t]+/)
param = args.shift
subcmd = find(Subcommands, param)
if subcmd
@@ -230,20 +230,13 @@
str += "\n" + subcmd.long_help if subcmd.long_help
return str
end
# general help
- s = "
+ s = %{
Generic command for showing things about byebug.
-
- --
- List of show subcommands:
- --
- "
- for subcmd in Subcommands do
- s += "show #{subcmd.name} -- #{subcmd.short_help}\n"
- end
- return s
+ }
+ s += format_subcmds(Subcommands)
end
end
end
end