~ruther/guix-local

59f734f351ee1703dca3e7e01150b52517d48849 — Ludovic Courtès 12 years ago 54ff0b7
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'.
1 files changed, 5 insertions(+), 1 deletions(-)

M guix/ui.scm
M guix/ui.scm => guix/ui.scm +5 -1
@@ 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