nitls: document projects
authorJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 11:33:39 +0000 (06:33 -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 9bfafd7..c94dbe2 100644 (file)
@@ -215,10 +215,19 @@ if opt_project.value then
                if opt_paths.value then
                        list.add(path)
                else
+                       var d = ""
+                       var md = p.mdoc_or_fallback
+                       if md != null then
+                               if tc.opt_no_color.value then
+                                       d = ": {md.content.first}"
+                               else
+                                       d = ": {md.content.first.green}"
+                               end
+                       end
                        if tc.opt_no_color.value then
-                               list.add("{p.name} ({path})")
+                               list.add("{p.name}{d} ({path})")
                        else
-                               list.add("{p.name} ({path.yellow})")
+                               list.add("{p.name}{d} ({path.yellow})")
                        end
                end
        end