Use #:usage-help
to describe the behavior of raco pkg install
.
In particular, specify the new behavior when no pkg-sources are given.
This commit is contained in:
parent
ac1a6ecda7
commit
8ef9b98d59
|
@ -98,9 +98,15 @@
|
||||||
#:attr (call 1)
|
#:attr (call 1)
|
||||||
(syntax->list #'(o.call ... ...))])
|
(syntax->list #'(o.call ... ...))])
|
||||||
|
|
||||||
|
(define-splicing-syntax-class usage-help
|
||||||
|
#:attributes ((command-line 1))
|
||||||
|
[pattern (~seq #:usage-help s:str ...)
|
||||||
|
#:attr (command-line 1)
|
||||||
|
(syntax->list #'(#:usage-help s ...))])
|
||||||
|
|
||||||
(define-syntax-class command
|
(define-syntax-class command
|
||||||
#:attributes (name function variables command-line)
|
#:attributes (name function variables command-line)
|
||||||
[pattern (name:id doc:expr og:option-group ... #:args args body:expr ...)
|
[pattern (name:id doc:expr uh:usage-help ... og:option-group ... #:args args body:expr ...)
|
||||||
#:do
|
#:do
|
||||||
[(define name-str (symbol->string (syntax->datum #'name)))]
|
[(define name-str (symbol->string (syntax->datum #'name)))]
|
||||||
#:attr function
|
#:attr function
|
||||||
|
@ -114,6 +120,7 @@
|
||||||
(quasisyntax/loc #'name
|
(quasisyntax/loc #'name
|
||||||
[#,name-str
|
[#,name-str
|
||||||
doc doc
|
doc doc
|
||||||
|
uh.command-line ... ...
|
||||||
og.command-line ... ...
|
og.command-line ... ...
|
||||||
#:args args
|
#:args args
|
||||||
(args-app args (name og.call ... ...))])]))
|
(args-app args (name og.call ... ...))])]))
|
||||||
|
|
|
@ -135,6 +135,8 @@
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
[install
|
[install
|
||||||
"Install packages"
|
"Install packages"
|
||||||
|
#:usage-help "Installs the packages specified by <pkg-source> ..."
|
||||||
|
"If no sources are specified, installs the current directory."
|
||||||
#:once-each
|
#:once-each
|
||||||
install-type-flags ...
|
install-type-flags ...
|
||||||
#:once-any
|
#:once-any
|
||||||
|
|
Loading…
Reference in New Issue
Block a user