changelog shortlog graph tags branches changeset file revisions annotate raw help

Mercurial > core / lisp/lib/cli/clap/opt.lisp

revision 649: 6e5006dfe7b8
parent 643: f901de70a80e
child 653: 119532882cb1
     1.1--- a/lisp/lib/cli/clap/opt.lisp	Thu Sep 12 16:48:47 2024 -0400
     1.2+++ b/lisp/lib/cli/clap/opt.lisp	Thu Sep 12 22:38:22 2024 -0400
     1.3@@ -42,14 +42,15 @@
     1.4   (description nil :type (or null string))
     1.5   (lock nil :type boolean))
     1.6 
     1.7-(defun %compose-short-opt (o arg)
     1.8-  (declare (ignorable arg))
     1.9+(defmethod activate-opt ((self cli-opt))
    1.10+  (setf (cli-lock-p self) t))
    1.11+
    1.12+(defun %compose-short-opt (o)
    1.13   (setf (cli-opt-val o) t)
    1.14   (make-cli-node 'opt o))
    1.15 
    1.16-(defun %compose-long-opt (o args)
    1.17-  (declare (ignorable args))
    1.18-  (setf (cli-opt-val o) (or (pop args) t))
    1.19+(defun %compose-long-opt (o &optional val)
    1.20+  (setf (cli-opt-val o) val)
    1.21   (make-cli-node 'opt o))
    1.22 
    1.23 (defmethod handle-unknown-argument ((self cli-opt) arg))