libre-man / unix-opts

Unix-style command line options parser
MIT License
107 stars 13 forks source link

Why not add 'when-option' to the package? #16

Closed digikar99 closed 4 years ago

digikar99 commented 5 years ago

when-option mentioned in examples/example.lisp seems like a useful little macro. Why don't you add it to the unix-opts package? That would help the community abide better by the DRY principle - I mean everyone would want to use it, right?

(defmacro when-option ((options opt) &body body)
  `(let ((it (getf ,options ,opt)))
     (when it
       ,@body)))
digikar99 commented 4 years ago

Not very necessary: https://digikar99.github.io/common-lisp.readthedocs/unix-opts/#getting-started