fun welcome do
print "Welcome in the Nit Index."
- print "\nCommands:"
- print "\tname\t\tlookup module, class and property with the corresponding 'name'"
- print "\tparam: Type\tlookup methods using the corresponding 'Type' as parameter"
- print "\treturn: Type\tlookup methods returning the corresponding 'Type'"
- print "\tEnter ':q' to exit\n"
+ print ""
print "Loaded modules:"
var mmodules = new Array[MModule]
mmodules.add_all(model.mmodules)
print "\t{m.name}"
end
print ""
+ help
+ end
+
+ fun help do
+ print "\nCommands:"
+ print "\tname\t\tlookup module, class and property with the corresponding 'name'"
+ print "\tparam: Type\tlookup methods using the corresponding 'Type' as parameter"
+ print "\treturn: Type\tlookup methods returning the corresponding 'Type'"
+ print "\tEnter ':q' to exit"
+ print "\tEnter ':h' to display this help message"
+ print ""
end
fun prompt do
prompt
return
end
+ if entry == ":h" then
+ help
+ prompt
+ return
+ end
if entry == ":q" then exit(0)
var pager = new Pager
# seek return types
end
# no matches
if pager.content.is_empty then
- print "Nothing known about '{entry}'"
+ print "Nothing known about '{entry}', type ':h' for help"
else
pager.render
end