summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-01-06 23:31:17 +0100
committerLudovic Courtès <ludo@gnu.org>2014-01-24 00:01:49 +0100
commit59f734f351ee1703dca3e7e01150b52517d48849 (patch)
tree6a3222c7dac597b5c821d440557514970e3e31c5
parent54ff0b7dd7e68fa50dbea7a2d335c98fc60057d4 (diff)
downloadguix-59f734f351ee1703dca3e7e01150b52517d48849.tar.gz
ui: Filter out internal commands from '--help'.
* guix/ui.scm (show-guix-help)[internal?]: New procedure.
  Use it to filter out internal commands reported by '--help'.
-rw-r--r--guix/ui.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 041887e7f0..bb811c557d 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -558,13 +558,17 @@ reporting."
        (command-files)))
 
 (define (show-guix-help)
+  (define (internal? command)
+    (member command '("substitute-binary" "authenticate")))
+
   (format #t (_ "Usage: guix COMMAND ARGS...
 Run COMMAND with ARGS.\n"))
   (newline)
   (format #t (_ "COMMAND must be one of the sub-commands listed below:\n"))
   (newline)
   ;; TODO: Display a synopsis of each command.
-  (format #t "~{   ~a~%~}" (sort (commands) string<?))
+  (format #t "~{   ~a~%~}" (sort (remove internal? (commands))
+                                 string<?))
   (show-bug-report-information))
 
 (define program-name