class Byebug::InfoCommand
def help(args)
def help(args) # specific subcommand help if args[1] subcmd = find(Subcommands, args[1]) return "Invalid \"info\" subcommand \"#{args[1]}\"." unless subcmd str = subcmd.short_help + '.' if 'file' == subcmd.name and args[2] subsubcmd = find(InfoFileSubcommands, args[2]) return str += "\nInvalid \"file\" attribute \"#{args[2]}\"." \ unless subsubcmd str += "\n" + subsubcmd.short_help + '.' else str += "\n" + subcmd.long_help if subcmd.long_help end return str end # general help s = %{ Generic command for showing things about the program being debugged. -- List of info subcommands: -- } for subcmd in Subcommands do s += "info #{subcmd.name} -- #{subcmd.short_help}\n" end return s end