chiark
/
gitweb
/
~mdw
/
sod
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
frontend.lisp: Add hooks for extensions to add new command-line options.
[sod]
/
src
/
optparse.lisp
diff --git
a/src/optparse.lisp
b/src/optparse.lisp
index 5268cda728f33c69f7c8c7e65c7acbdeaaa059b0..5017fe4daaa769f26a34d1c6fc8eceb59469af08 100644
(file)
--- a/
src/optparse.lisp
+++ b/
src/optparse.lisp
@@
-997,22
+997,25
@@
(defun show-options-help (opts &optional (stream *standard-output*))
(dolist (o opts)
(let ((doc (opt-documentation o)))
(cond ((not o))
(dolist (o opts)
(let ((doc (opt-documentation o)))
(cond ((not o))
- ((not (opt-long-name o))
+ ((not (or (opt-short-name o)
+ (opt-long-name o)))
(when newlinep
(terpri stream)
(setf newlinep nil))
(pprint-logical-block (stream nil)
(print-text doc stream))
(terpri stream))
(when newlinep
(terpri stream)
(setf newlinep nil))
(pprint-logical-block (stream nil)
(print-text doc stream))
(terpri stream))
- (
t
+ (
doc
(setf newlinep t)
(pprint-logical-block (stream nil :prefix " ")
(setf newlinep t)
(pprint-logical-block (stream nil :prefix " ")
- (format stream "~:[ ~;-~:*~C
,~] --~A
"
+ (format stream "~:[ ~;-~:*~C
~:[~;,~]~:*~]~@[ --~A~]
"
(opt-short-name o)
(opt-long-name o))
(when (opt-arg-name o)
(opt-short-name o)
(opt-long-name o))
(when (opt-arg-name o)
- (format stream "~:[=~A~;[=~A]~]"
+ (format stream
+ "~:[~;[~]~:[~0@*~:[ ~;~]~*~;=~]~A~0@*~:[~;]~]"
(opt-arg-optional-p o)
(opt-arg-optional-p o)
+ (opt-long-name o)
(opt-arg-name o)))
(write-string " " stream)
(pprint-tab :line 30 1 stream)
(opt-arg-name o)))
(write-string " " stream)
(pprint-tab :line 30 1 stream)