                        ido-text
                      (minibuffer-contents-no-properties)))
          (buffers (lusty-filter-buffers (buffer-list)))
-         (completions (let ((iswitchb-text contents))
-                        (iswitchb-get-matched-buffers contents nil buffers)))
-         (match (find contents completions :test 'string=))
-         (unique-completion
+         (matches
+          (lusty-sort-by-fuzzy-score 
+           buffers
+           contents))
+         (openable-p
           ;; Only one entry.
-          (let ((first-entry (car completions)))
+          (let ((first-entry (car matches)))
             (and (stringp first-entry)
-                 (endp (cdr completions))
-                 first-entry))))
-    (values completions
-            match
-            unique-completion)))
-
-(defun lusty-file-explorer-completions ()
+                 (endp (cdr matches))))))
+    (values matches openable-p)))
+
+(defun lusty-file-explorer-matches ()
   (let* ((path (minibuffer-contents-no-properties))
          (dir (lusty-normalize-dir (file-name-directory path)))
          (file-portion (file-name-nondirectory path))
-         (completions
-          (sort (and dir
-                     (lusty-filter-files
-                      file-portion
-                      ;; TODO: let bind read-file-name-completion-ignore-case 
-                      ;; based on whether file-portion includes uppercase
-                      (file-name-all-completions file-portion dir)))
-                'string<))
-         (match (find file-portion completions :test 'string=))
+         (matches
+          ;; TODO: let bind read-file-name-completion-ignore-case 
+          ;; based on whether file-portion includes uppercase
+          (and dir
+               (lusty-sort-by-fuzzy-score 
+                (lusty-filter-files
+                 file-portion
+                 (directory-files dir nil nil t))
+                file-portion)))
+         (openable-p
+          ;; Only one entry and not a directory.
+          (let ((first-entry (car matches)))
+            (and (stringp first-entry)
+                 (endp (cdr matches))
+                 (let ((new-path (concat dir first-entry)))
+                   (not (file-directory-p new-path))))))
          (unique-completion
+          ;; STEVE review
           ;; Only one entry and not a directory.
-          (let ((first-entry (car completions)))
+          ;; STEVE why not a directory?
+          (let ((first-entry (car matches)))
             (and (stringp first-entry)
-                 (endp (cdr completions))
+                 (endp (cdr matches))
                  (let ((new-path (concat dir first-entry)))
                    (and (not (file-directory-p new-path))
                         new-path))))))
-    (values completions
-            match
-            unique-completion)))
+    (values matches openable-p)))
 
 (defun lusty-propertize-path (path)
   "Propertize the given PATH like so: <dir></><dir></><file>

    (when buffer
      (switch-to-buffer buffer))))

;; TODO: completion-ignore-case
;;       (let ((completion-ignore-case (blah))) ...
;;       read-file-name-completion-ignore-case
;; TODO: highlight opened buffers in filesystem explorer

(defun lusty-normalize-dir (dir)
  "Clean up the given directory path."

    ;;     remember to add back the '/'
    ;;     update the minibuffer contents
    ;;   
    (setq lusty--previous-contents (minibuffer-contents-no-properties)
          lusty--highlighted-index 0)
    (lusty-update-completion-buffer)))

;; Cribbed with modification from tail-select-lowest-window.
