From 05b520c8c88fcf89708b89bad9f6abcdb4750c0e Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 29 Jul 2013 13:10:57 -0400 Subject: [PATCH] ni: better display of welcome screen Signed-off-by: Alexandre Terrasa --- src/ni.nit | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ni.nit b/src/ni.nit index aad0b02..03ffaa0 100644 --- a/src/ni.nit +++ b/src/ni.nit @@ -69,13 +69,20 @@ class NitIndex end fun welcome do - print "Welcome in Nit Index.\n" - print "Loaded modules" - for m in mbuilder.nmodules do - print " - {m.mmodule.name}" + 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 a blank line to exit.\n" + print "\nLoaded modules:" + var mmodules = new Array[MModule] + mmodules.add_all(model.mmodules) + var sorter = new MModuleNameSorter + sorter.sort(mmodules) + for m in mmodules do + print "\t{m.name}" end - print "\nEnter the module, class or property name you want to look up." - print "Enter a blank line to exit.\n" end fun prompt do -- 1.7.9.5