anchor.diff:             (unless (zerop (fset:size matches))
                matches)))))))
   
  +(defvar *error-on-failed-glob* nil
  +  "If this variable is non-nil, then an error will be signaled when
  +pathname expansion cannot find any matches for a glob pattern.
  +
  +POSIX says that if a glob doesn't match any files then pathname
  +expansion should simply produce the string the user typed.  So, if the
  +user runs
  +    rm [fb]oo
  +in a directory where neither foo nor boo exist, then rm will receive
  +the string '[fb]oo' as its argument.  That's a bit whacky.  If this
  +variable is non-nil, then a glob failure aborts the command.")
  +
   (defun expand-wild-path (wild-path)
     "Given a `wild-path', produce an `fset:seq' of strings representing
   the paths that were matched.
   
   Returns nil if no matches were found."
  -  (unless (wild-path-wild-p wild-path)
  -    (error "Expansion of non-wild wild-paths is not supported"))
  +  (unless (wild-path-has-wild-component-p wild-path)
  +    (return-from expand-wild-path (fset:seq (wild-path-original-fragments wild-path))))
   
     (let ((matches
  -         (with-local-working-directory (".")
  -           (%expand-wild-path (wild-path-directories wild-path) 0 (wild-path-file-name wild-path)))))
  -    (when matches
  -      (labels
  -          ((prepare-match (match)
  -             (fset:seq (make-string-fragment (fset:convert 'string match) :quoted-p t))))
  -        (declare (dynamic-extent #'prepare-match))
  -        (fset:image #'prepare-match matches)))))
  +          (with-local-working-directory (".")
  +            (%expand-wild-path (wild-path-directories wild-path) 0 (wild-path-file-name wild-path)))))
  +    (cond
  +      (matches
  +       (labels
  +           ((prepare-match (match)
  +              (fset:seq (make-string-fragment (fset:convert 'string match) :quoted-p t))))
  +         (declare (dynamic-extent #'prepare-match))
  +         (fset:image #'prepare-match matches)))
  +      (*error-on-failed-glob*
  +       (error "Glob pattern didn't match anything: ~A" (wild-path-original-fragments wild-path)))
  +      (t
  +       (wild-path-original-fragments wild-path)))))
   
   (defun expand-tilde-words (fragment-seqs)
     "Perform tilde expansion on the given sequence of fragment
  
positive.code:         (started (unless start-at t)))
      (macrolet
          ((consider (name)
             `(progn
                (when (and (not started) (eq start-at ',name))
                  (setf started t))
                (when (eq end-at ',name)
                  (unless started
                    (error "Invalid start point ~A" start-at))
                  (return-from compute-expansion-pipeline pipeline))
                (when (and started ,name)
                  (vector-push-extend ',name pipeline)))))
        (consider expand-aliases)
        (consider expand-token-sequence)
        (consider expand-tilde-words)
        (consider expand-pathname-words)
        (consider concatenate-fragmented-words)
        (when (and start-at (not started))
          (error "Invalid start point ~A" start-at))
  
negative.code:       pipeline)))
  
  (defun expansion-for-words (things &key expand-aliases expand-pathname-words
                                       (split-fields *split-fields-default*)
                                       (allow-side-effects *allow-side-effects-default*))
    "Perform expansion on a sequence of tokens.
  
  This always performs the expansion done by the `expand' generic
  