diff options
-rw-r--r-- | init.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/init.el b/init.el index a114c94..91f8baa 100644 --- a/init.el +++ b/init.el | |||
@@ -713,17 +713,17 @@ | |||
713 | :repo "minad/consult")) | 713 | :repo "minad/consult")) |
714 | 714 | ||
715 | ;; "Sensible" functions | 715 | ;; "Sensible" functions |
716 | (defun consult-sensible-grep () | 716 | (defun consult-sensible-grep (&optional arg) |
717 | "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' | 717 | "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' |
718 | if ripgrep is installed, otherwise `consult-grep'." | 718 | if ripgrep is installed, otherwise `consult-grep'." |
719 | (interactive "P") | 719 | (interactive "P") |
720 | (cond ((= (vc-backend buffer-file-name) "Git") | 720 | (cond ((string-equal (vc-backend buffer-file-name) "Git") |
721 | (call-interactively #'consult-git-grep)) | 721 | (call-interactively #'consult-git-grep)) |
722 | ((executable-find "rg") | 722 | ((executable-find "rg") |
723 | (call-interactively #'consult-ripgrep)) | 723 | (call-interactively #'consult-ripgrep)) |
724 | (t (call-interactively #'consult-grep)))) | 724 | (t (call-interactively #'consult-grep)))) |
725 | 725 | ||
726 | (defun consult-sensible-find () | 726 | (defun consult-sensible-find (&optional arg) |
727 | "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." | 727 | "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." |
728 | (interactive "P") | 728 | (interactive "P") |
729 | (cond ((executable-find "locate") (call-interactively #'consult-locate)) | 729 | (cond ((executable-find "locate") (call-interactively #'consult-locate)) |