X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=main.lisp;h=b64ade2e9660278079120c64aa0530e34e0ca97b;hb=7cd455fcfc9785190872d8bc262927eee3e05d12;hp=311b73bf6960fb2aafb3aabc2a2471ec1b840e40;hpb=4a290fc819181811e56e3f11fdfa5090327ae72b;p=getopt.git diff --git a/main.lisp b/main.lisp index 311b73b..b64ade2 100644 --- a/main.lisp +++ b/main.lisp @@ -28,7 +28,7 @@ (and (> (length arg) 2) (char= #\- (schar arg 0)) (char= #\- (schar arg 1)) - (char/= #\- (schar arg 3)))) + (char/= #\- (schar arg 2)))) (defun decompose-arg (arg option-type) "Returns base-name,argument" @@ -120,11 +120,12 @@ opts is a list of option lists. The fields of the list are ((null argument) (if (and (eq :required (second option-list)) (null (cdr pos))) (push base-name errors) - (if (or (is-short-option (second pos)) + (if (or (eq :none (second option-list)) + (is-short-option (second pos)) (is-long-option (second pos))) (if (eq :required (second option-list)) (push base-name errors) - (push (cons base-name (third option-list)) out-args)) + (push (cons base-name (third option-list)) out-opts)) (progn (push (cons base-name (second pos)) out-opts) (setq pos (cdr pos))))))))