nitls: improve the man by giving better examples
authorJean Privat <jean@pryen.org>
Fri, 12 Aug 2016 00:40:52 +0000 (20:40 -0400)
committerJean Privat <jean@pryen.org>
Fri, 12 Aug 2016 00:41:39 +0000 (20:41 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

share/man/nitls.md

index 5e9ec4d..14767cd 100644 (file)
@@ -1,6 +1,6 @@
 # NAME
 
-nitls - lists the packages, groups and paths of Nit sources files.
+nitls - search and lists the packages, groups and paths of Nit sources files.
 
 # SYNOPSIS
 
@@ -8,9 +8,9 @@ nitls [*options*] [*FILE*]...
 
 # DESCRIPTION
 
-`nitls` is used to list Nit files in directories and extract the module-group-package relation.
+`nitls` is used to search and list Nit files in directories and extract the module-group-package relation.
 
-It is basically a `ls` or a simple `find` specialized on `.nit` source files.
+It is basically a `ls`, a `which` or a simple `find` specialized on `.nit` source files.
 
 By default `nitls` works with the current directory (`.`).
 
@@ -29,11 +29,43 @@ Each file can then be:
 
 Show the tree of modules from the current directory.
 
-    $ nitls -t
+    $ nitls
+    test_prog: Test program for model tools. (.)
+    |--game: Gaming group (./game)
+    |  `--game: A game abstraction for RPG. (./game/game.nit)
+    |--platform: Fictive Crappy Platform. (./platform)
+    |  `--platform: Declares base types allowed on the platform. (./platform/platform.nit)
+    |--rpg: Role Playing Game group (./rpg)
+    |  |--careers: Careers of the game. (./rpg/careers.nit)
+    |  |--character: Characters are playable entity in the world. (./rpg/character.nit)
+    |  |--combat: COmbat interactions between characters. (./rpg/combat.nit)
+    |  |--races: Races of the game. (./rpg/races.nit)
+    |  `--rpg: A worlg RPG abstraction. (./rpg/rpg.nit)
+    `--test_prog: A test program with a fake model to check model tools. (./test_prog.nit)
+
 
 Show the list of packages imported by the modules of the current directory.
 
     $ nitls -d -P *.nit
+    base64: Offers the base 64 encoding and decoding algorithms (/home/privat/prog/nit/lib/base64.nit)
+    core: # Nit common library of core classes and methods (/home/privat/prog/nit/lib/core)
+    curl: Data transfer with URL syntax (/home/privat/prog/nit/lib/curl)
+    json (/home/privat/prog/nit/lib/json)
+    libevent: Low-level wrapper around the libevent library to manage events on file descriptors (/home/privat/prog/nit/lib/libevent.nit)
+    md5: Native MD5 digest implementation as `Text::md5` (/home/privat/prog/nit/lib/md5.nit)
+    more_collections: Highly specific, but useful, collections-related classes. (/home/privat/prog/nit/lib/more_collections.nit)
+    nitcc_runtime: Runtime library required by parsers and lexers generated by nitcc (/home/privat/prog/nit/lib/nitcc_runtime.nit)
+    nitcorn: Lightweight framework for Web applications development (.)
+    parser_base: Simple base for hand-made parsers of all kinds (/home/privat/prog/nit/lib/parser_base.nit)
+    performance_analysis: Services to gather information on the performance of events by categories (/home/privat/prog/nit/lib/performance_analysis.nit)
+    realtime: Services to keep time of the wall clock time (/home/privat/prog/nit/lib/realtime.nit)
+    serialization: # Abstract serialization services (/home/privat/prog/nit/lib/serialization)
+    template: Basic template system (/home/privat/prog/nit/lib/template)
+
+Show the directory of the package `inkscape_tools`.
+
+    $ nitls -pP inkscape_tools
+    /home/privat/prog/nit/contrib/inkscape_tools
 
 # OPTIONS