diff --git a/collects/planet/private/cmdline-tool.rkt b/collects/planet/private/cmdline-tool.rkt index 0c97b9eec4..cbf941447f 100644 --- a/collects/planet/private/cmdline-tool.rkt +++ b/collects/planet/private/cmdline-tool.rkt @@ -31,7 +31,6 @@ PLANNED FEATURES: (svn-style-command-line #:program (short-program+command-name) #:argv (current-command-line-arguments) - #:prefix (if raco? "raco " "") "The Racket command-line tool for manipulating packages installed by PLaneT." ["create" "create a PLaneT archive from a directory" "\nCreate a PLaneT archive in the current directory whose contents are the directory ." diff --git a/collects/planet/private/command.rkt b/collects/planet/private/command.rkt index 65ddcc799d..f996079243 100644 --- a/collects/planet/private/command.rkt +++ b/collects/planet/private/command.rkt @@ -35,19 +35,17 @@ (syntax-case stx () [(_ #:program prog #:argv args - #:prefix pfx-e general-description [name description long-description body ... #:args formals final-expr] ...) (with-syntax ([(n ...) (generate-temporaries #'(name ...))]) - #'(let* ([pfx-x pfx-e] - [p prog] + #'(let* ([p prog] [a args] [n name] ... [argslist (cond [(list? a) a] [(vector? a) (vector->list a)] [else (error 'command "expected a vector or list for arguments, received ~e" a)])] - [help (λ () (display-help-message p pfx-x general-description `((name description) ...)))]) + [help (λ () (display-help-message p general-description `((name description) ...)))]) (let-values ([(the-command remainder) (if (null? argslist) (values "help" '()) @@ -71,9 +69,9 @@ [else (help)]))))])) -;; display-help-message : string (listof (list string string)) -> void +;; display-help-message : string string (listof (list string string)) -> void ;; prints out the help message -(define (display-help-message prog prefix general-description commands) +(define (display-help-message prog general-description commands) (let* ([maxlen (apply max (map (λ (p) (string-length (car p))) commands))] [message-lines `(,(format "Usage: ~a [option ...] " prog) @@ -81,11 +79,11 @@ "" ,@(wrap-to-count general-description 80) "" - ,(format "For help on a particular subcommand, type '~aplanet --help'" prefix) + ,(format "For help on a particular subcommand, type '~a --help'" prog) ,@(map (λ (command) (let* ([padded-name (pad (car command) maxlen)] [desc (cadr command)] - [msg (format " ~aplanet ~a ~a" prefix padded-name desc)]) + [msg (format " ~a ~a ~a" prog padded-name desc)]) msg)) commands))]) (for-each (λ (line) (display line) (newline)) message-lines)))