def help(args)
if args[1]
s = args[1]
subcmd = Subcommands.find do |try_subcmd|
(s.size >= try_subcmd.min) and
(try_subcmd.name[0..s.size-1] == s)
end
if subcmd
str = subcmd.short_help + '.'
str += "\n" + subcmd.long_help if subcmd.long_help
return str
else
return "Invalid 'set' subcommand '#{args[1]}'."
end
end
s = %{
Modifies parts of the ruby-debug environment. Boolean values take
on, off, 1 or 0.
You can see these environment settings with the \"show\" command.
--
List of set subcommands:
--
}
for subcmd in Subcommands do
s += "set #{subcmd.name} -- #{subcmd.short_help}\n"
end
return s
end