# NAME
-Lists the projects and/or paths of Nit sources files.
+nitls - lists the projects, groups and paths of Nit sources files.
-# SYNOPSYS
+# SYNOPSIS
-nitls [*options*]...
+nitls [*options*] [*FILE*]...
-# OPTIONS
+# DESCRIPTION
-`-W`, `--warn`
-: Show more warnings
+`nitls` is used to list Nit files in directories and extract the module-group-project relation.
-`-w`, `--warning`
-: Show/hide a specific warning
+It is basically a `ls` or a simple `find` specialized on `.nit` source files.
-`-q`, `--quiet`
-: Do not show warnings
+By default `nitls` works with the current directory (`.`).
-`--stop-on-first-error`
-: Stop on first error
+Each file can then be:
-`--no-color`
-: Do not use color to display errors and warnings
+* A Nit module (file).
+ In this case, only this single module is considered
+* A Nit group (directory).
+ In this case, all the modules of the groups (and recursively the sub-groups) are considered
+* A normal directory.
+ In this case, all its entries are analysed.
+ Files that are Nit modules and directories that are Nit groups are considered.
+ Other files and directories are ignored.
-`--log`
-: Generate various log files
+# EXAMPLES
-`--log-dir`
-: Directory where to generate log files
+Show the tree of modules from the current directory.
-`-h`, `-?`, `--help`
-: Show Help (This screen)
+ $ nitls -t
-`--version`
-: Show version and exit
+Show the list of projects imported by the modules of the current directory.
-`--set-dummy-tool`
-: Set toolname and version to DUMMY. Useful for testing
+ $ nitls -d -P *.nit
-`-v`, `--verbose`
-: Verbose
+# OPTIONS
-`--bash-completion`
-: Generate bash_completion file for this program
+Each combination of option
-`--stub-man`
-: Generate a stub manpage in pandoc markdown format
+## PRESENTATION MODE
-`--disable-phase`
-: DEBUG: Disable a specific phase; use `list` to get the list.
+Three presentation modes are available.
-`-I`, `--path`
-: Set include path for loaders (may be used more than once)
+`-P`, `--project`
+: List projects in a flat list (default).
-`--only-parse`
-: Only proceed to parse step of loaders
+ Only project are displayed (and not the individual files).
-`--only-metamodel`
-: Stop after meta-model processing
+`-t`, `--tree`
+: List source files in their groups and projects.
-`--ignore-visibility`
-: Do not check, and produce errors, on visibility issues.
+ Each `.nit` file is presented in a tree of projects and groups.
-`-k`, `--keep`
-: Ignore errors and files that are not a Nit source file
+`-s`, `--source`
+: List source files in a flat list.
-`-r`, `--recursive`
-: Process directories recussively
+ Each `.nit` file is presented indivitually.
-`-t`, `--tree`
-: List source files in their groups and projects
+The three modes are exclusives.
-`-s`, `--source`
-: List source files
+The default mode is `--project` unless one on the argument is a group, then it is `--group`.
-`-P`, `--project`
-: List projects paths (default)
+## COLLECT
+
+`-r`, `--recursive`
+: Process directories recursively.
+
+ All `.nit` files found in the specified directory and subdirectories are considered.
`-d`, `--depends`
: List dependencies of given modules
+ All imported modules are also considered.
+
+ In --tree and --source modes, the modules direclty imported are also displayed.
+
+`-k`, `--keep`
+: Ignore errors and files that are not a Nit source file.
+
+ When a file that is not a valid Nit module is encoutered, it is ignored and the rest of the files are
+ processed.
+
+ Without this option, an error message is displayed and nitls terminates on such a case.
+
+## PRESENTATION OPTIONS
+
`-p`, `--path`
-: List only path (instead of name + path)
+: List only path (instead of name + path).
+
+ Paths are displayed uncolored.
`-M`
-: List dependencies suitable for a rule in a Makefile. Alias for -d, -p and -s
+: List dependencies suitable for a rule in a Makefile.
+
+ Alias for `-d`, `-p` and `-s`.
# SEE ALSO