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'.
This commit is contained in:
Ludovic Courtès 2014-01-06 23:31:17 +01:00
parent 54ff0b7dd7
commit 59f734f351
1 changed files with 5 additions and 1 deletions

View File

@ -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