On recent SBCLs, at least, (directory "fo*.*") only finds foo if foo is a file, not a directory. Not sure if this is a bug or a feature, but it breaks my understanding of how filename completion should work. The following (slightly ugly) patch fixes things for me:
diff --git a/presentation-defs.lisp b/presentation-defs.lisp index 8661046..fb2de97 100644 --- a/presentation-defs.lisp +++ b/presentation-defs.lisp @@ -1629,8 +1629,21 @@ protocol retrieving gestures from a provided string.")) do (replace so-far "\ *" :start1 occurence) (setf start (+ occurence 2)) finally (return so-far))) + #+sbcl and #+sbcl wildcard-directories #+sbcl = + #+sbcl (format nil "~A*" + (loop for start = 0 ; Replace * -> * + for occurence = (position #* so-far :start start) + until (= start (length so-far)) + until (null occurence) + do (replace so-far "\*" :start1 occurence) + (setf start (+ occurence 2)) + finally (return so-far))) for path in - #+(or sbcl cmu lispworks) (directory wildcard) + #+sbcl (remove-duplicates + (append (directory wildcard) + (directory wildcard-directories)) + :test #'equal) + #+(or cmu lispworks) (directory wildcard) #+openmcl (directory wildcard :directories t) #+allegro (directory wildcard :directories-are-files nil) #+cormanlisp (nconc (directory wildcard)
Any suggestions on the best way to handle this?
thanks,
cyrus