code: remove `protected` from top-level methods (now in sys)
[nit.git] / share / man / nitls.md
1 % NITLS(1)
2
3 # NAME
4
5 nitls - lists the projects, groups and paths of Nit sources files.
6
7 # SYNOPSIS
8
9 nitls [*options*] [*FILE*]...
10
11 # DESCRIPTION
12
13 `nitls` is used to list Nit files in directories and extract the module-group-project relation.
14
15 It is basically a `ls` or a simple `find` specialized on `.nit` source files.
16
17 By default `nitls` works with the current directory (`.`).
18
19 Each file can then be:
20
21 * A Nit module (file).
22   In this case, only this single module is considered
23 * A Nit group (directory).
24   In this case, all the modules of the groups (and recursively the sub-groups) are considered
25 * A normal directory.
26   In this case, all its entries are analysed.
27   Files that are Nit modules and directories that are Nit groups are considered.
28   Other files and directories are ignored.
29
30 # EXAMPLES
31
32 Show the tree of modules from the current directory.
33
34     $ nitls -t
35
36 Show the list of projects imported by the modules of the current directory.
37
38     $ nitls -d -P *.nit
39
40 # OPTIONS
41
42 Each combination of option
43
44 ## PRESENTATION MODE
45
46 Three presentation modes are available.
47
48 `-P`, `--project`
49 :   List projects in a flat list (default).
50
51     Only project are displayed (and not the individual files).
52
53 `-t`, `--tree`
54 :   List source files in their groups and projects.
55
56     Each `.nit` file is presented in a tree of projects and groups.
57
58 `-s`, `--source`
59 :   List source files in a flat list.
60
61     Each `.nit` file is presented indivitually.
62
63 The three modes are exclusives.
64
65 The default mode is `--project` unless one on the argument is a group, then it is `--group`.
66
67 ## COLLECT
68
69 `-r`, `--recursive`
70 :   Process directories recursively.
71
72     All `.nit` files found in the specified directory and subdirectories are considered.
73
74 `-d`, `--depends`
75 :   List dependencies of given modules
76
77     All imported modules are also considered.
78
79     In --tree and --source modes, the modules direclty imported are also displayed.
80
81 `-k`, `--keep`
82 :   Ignore errors and files that are not a Nit source file.
83
84     When a file that is not a valid Nit module is encoutered, it is ignored and the rest of the files are
85     processed.
86
87     Without this option, an error message is displayed and nitls terminates on such a case.
88
89 ## PRESENTATION OPTIONS
90
91 `-p`, `--path`
92 :   List only path (instead of name + path).
93
94     Paths are displayed uncolored.
95
96 `-M`
97 :   List dependencies suitable for a rule in a Makefile.
98
99     Alias for `-d`, `-p` and `-s`.
100
101 # SEE ALSO
102
103 The Nit language documentation and the source code of its tools and libraries may be downloaded from <http://nitlanguage.org>