Browse Source

Check rg existance

master
10sr 4 years ago
parent
commit
1dd9b496d9
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      emacs.el

+ 2
- 0
emacs.el View File

@@ -1151,6 +1151,8 @@ THEM are function and its args."
(defun my-fzf-all-lines () (defun my-fzf-all-lines ()
"Fzf all lines." "Fzf all lines."
(interactive) (interactive)
(unless (executable-find "rg")
(error "rg not found"))
(let ((process-environment (cl-copy-list process-environment))) (let ((process-environment (cl-copy-list process-environment)))
(setenv "FZF_DEFAULT_COMMAND" "rg -nH --no-heading --hidden --follow --glob '!.git/*' --color=always ^") (setenv "FZF_DEFAULT_COMMAND" "rg -nH --no-heading --hidden --follow --glob '!.git/*' --color=always ^")
(fzf))) (fzf)))


Loading…
Cancel
Save