nitc :: CommandHelp
nitc :: CommandHelp :: defaultinit
nitc $ CommandHelp :: SELF
Type of this instance, automatically specialized in every classnitc $ CommandHelp :: name
Short name of the command, specified in the command linenitc :: Command :: _all_commands
nitc :: Command :: all_commands
nitc :: Command :: all_commands=
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: Command :: defaultinit
nitc :: CommandHelp :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
# Show general help or help specific to a command
class CommandHelp
super Command
redef fun name do return "help"
redef fun usage do return "nitpm help [command]"
redef fun description do return "Show general help message or the help for a command"
redef fun apply(args)
do
# Try first to help about a valid action
if args.length == 1 then
var command = commands.get_or_null(args.first)
if command != null then
command.print_local_help
return
end
end
print_help
end
end
src/nitpm.nit:344,1--365,3