From 7c066c42b02553ed0562a8e35c92f24ef9e976a9 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Thu, 21 Sep 2023 07:41:59 +0100 Subject: Remove custom consult-fd to use new builtin one --- .emacs.d/lisp/init-minibuffer.el | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to '.emacs.d/lisp') diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el index efed1a8..4d4c1d1 100644 --- a/.emacs.d/lisp/init-minibuffer.el +++ b/.emacs.d/lisp/init-minibuffer.el @@ -284,29 +284,6 @@ DEFS is a plist associating completion categories to commands." (defun consult-ripgrep-parent (&optional initial) (interactive "P") (consult-ripgrep (file-name-directory (directory-file-name (persp-current-project-root))) initial)) - (defvar consult--fd-command nil) - (defun consult--fd-builder (input) - (unless consult--fd-command - (setq consult--fd-command - (if (eq 0 (call-process-shell-command "fdfind")) - "fdfind" - "fd"))) - (pcase-let* ((`(,arg . ,opts) (consult--command-split input)) - (`(,re . ,hl) (funcall consult--regexp-compiler - arg 'extended t))) - (when re - (list :command (append - (list consult--fd-command - "--color=never" "--full-path" - (consult--join-regexps re 'extended)) - opts) - :highlight hl)))) - - (defun consult-fd (&optional dir initial) - (interactive "P") - (let* ((prompt-dir (consult--directory-prompt "Fd" dir)) - (default-directory (cdr prompt-dir))) - (find-file (consult--find (car prompt-dir) #'consult--fd-builder initial)))) (defalias 'consult-line-thing-at-point 'consult-line) (defalias 'consult-ripgrep-thing-at-point 'consult-ripgrep) -- cgit 1.4.1-2-gfad0