anchor.diff:    (:import-from :shcl/core/fork-exec #:run)
     (:export
      #:define-builtin #:define-special-builtin #:lookup-command
  -   #:command-error #:wrap-errors #:invoke-command #:shell-lambda)
  +   #:command-error #:wrap-errors #:invoke-command #:shell-lambda
  +   #:with-parsed-arguments)
     (:documentation
      "This package contains functionality related to defining and
   running shell commands."))
  
positive.code:                          (ensure-unique-flag (concatenate 'string "--" (string-downcase (symbol-name arg)))))
                   flag))
                 ((consp arg)
                  (destructuring-bind (variable flag-string) arg
                    (check-type variable symbol)
                    (check-type flag-string string)
                    (unless (valid-flag-sigil-p flag-string nil)
                      (error "Flag argument sigils must contain a character other than -"))
                    (vector-push-extend
                     (vector (ensure-unique-variable variable)
                             (ensure-unique-flag flag-string))
                     flag)))
                 (t
                  (error "Malformed flag argument, got: ~A" arg))))
             (&option (arg)
  
negative.code:                (error 'command-error :message "All shell commands must receive the command name as an argument"))
               ,@(when argv0
                   `((setf ,argv0 ,arg))))
             ,@(unless (and (zerop (length flags))
                            (zerop (length options)))
                 `((let ((,option-table (make-hash-table :test 'equal))
                         (,flag-table (make-hash-table :test 'equal)))
                     ,@(loop :for spec :across options
                          :for var = (aref spec 0)
                          :for sigils = (subseq spec 1) :collect
                          `(labels
                               ((,option-setter (,arg)
                                  (vector-push-extend ,arg ,var)))
                             (setf ,var (make-extensible-vector))
                             (loop :for ,arg :across ,sigils :do
                                (setf (gethash ,arg ,option-table) #',option-setter))))
                     ,@(loop :for spec :across flags
                          :for var = (aref spec 0)
                          :for sigils = (subseq spec 1) :collect
                          `(labels
                               ((,flag-setter (,arg)
                                  (vector-push-extend ,arg ,var)))
                             (setf ,var (make-extensible-vector))
                             (loop :for ,arg :across ,sigils :do
                                (setf (gethash ,arg ,flag-table) #',flag-setter))))
                     (setf ,args (parse-flags-and-options ,flag-table ,option-table ,args)))))
             ,@(loop :for var :across required-args :collect
                  `(let ((,arg (pop ,args)))
                     (unless ,arg
  