lib/byebug/commands/show.rb in byebug-1.1.0 vs lib/byebug/commands/show.rb in byebug-1.1.1
- old
+ new
@@ -71,12 +71,12 @@
end
else
s='No readline support'
end
return s
- when /^byebugtesting$/
- on_off = Command.settings[:byebugtesting]
+ when /^testing$/
+ on_off = Command.settings[:testing]
return "Currently testing byebug is #{show_onoff(on_off)}."
when /^forcestep$/
on_off = self.class.settings[:force_stepping]
return "force-stepping is #{show_onoff(on_off)}."
when /^fullpath$/
@@ -213,30 +213,29 @@
print "Unknown show command #{param}\n"
end
end
end
+ def help(args)
+ if args[1]
+ subcmd = find(Subcommands, args[1])
+ return "Invalid \"show\" subcommand \"#{args[1]}\"." unless subcmd
+ str = subcmd.short_help + '.'
+ str += "\n" + subcmd.long_help if subcmd.long_help
+ return str
+ end
+ ShowCommad.description + format_subcmds(Subcommands)
+ end
+
class << self
- def help_command
- "show"
+ def names
+ %w(show)
end
- def help(args)
- # specific subcommand help
- if args[1]
- subcmd = find(Subcommands, args[1])
- return "Invalid \"show\" subcommand \"#{args[1]}\"." unless subcmd
-
- str = subcmd.short_help + '.'
- str += "\n" + subcmd.long_help if subcmd.long_help
- return str
- end
-
- # general help
- s = %{
+ def description
+ %{
Generic command for showing things about byebug.
}
- s += format_subcmds(Subcommands)
end
end
end
end