+;; (define-key minibuffer-local-completion-map
+;; "\t" #'minibuffer-force-complete)
+
+(with-eval-after-load 'icomplete
+
+(setq icomplete-on-del-error-function #'abort-recursive-edit)
+
+(defun b/icomplete-fido-backward-updir ()
+ "Delete char before or go up directory, like `ido-mode'."
+ (interactive)
+ (if (and (eq (char-before) ?/)
+ (eq (icomplete--category) 'file))
+ (save-excursion
+ (goto-char (1- (point)))
+ (when (search-backward "/" (point-min) t)
+ (delete-region (1+ (point)) (point-max))))
+ (condition-case nil
+ (call-interactively #'delete-backward-char)
+ (error
+ (when icomplete-on-del-error-function
+ (funcall icomplete-on-del-error-function))))))
+
+(define-key icomplete-fido-mode-map
+ (kbd "DEL") #'b/icomplete-fido-backward-updir))
+