nitls: work on . by default
authorJean Privat <jean@pryen.org>
Fri, 5 Dec 2014 03:18:10 +0000 (22:18 -0500)
committerJean Privat <jean@pryen.org>
Sat, 6 Dec 2014 04:25:20 +0000 (23:25 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitls.nit

index c94dbe2..49ec699 100644 (file)
@@ -119,6 +119,7 @@ var opt_paths = new OptionBool("List only path (instead of name + path)", "-p",
 
 tc.option_context.add_option(opt_keep, opt_recursive, opt_tree, opt_source, opt_project, opt_depends, opt_paths, opt_make)
 tc.tooldescription = "Usage: nitls [OPTION]... <file.nit|directory>...\nLists the projects and/or paths of Nit sources files."
+tc.accept_no_arguments = true
 tc.process_options(args)
 
 if opt_make.value then
@@ -139,6 +140,7 @@ tc.keep_going = opt_keep.value
 var model = new Model
 var mb = new ModelBuilder(model, tc)
 
+if tc.option_context.rest.is_empty then tc.option_context.rest.add "."
 var files
 if opt_recursive.value then
        files = new Array[String]