Skip to content

Commit f56292e

Browse files
author
Chen Bin
committed
make find executable name configurable
1 parent 3ae5d06 commit f56292e

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

‎find-file-in-project.el

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
;; Copyright (C) 2006-2009, 2011-2012, 2015-2018
44
;; Phil Hagelberg, Doug Alcorn, Will Farrington, Chen Bin
55
;;
6-
;; Version: 6.2.2
6+
;; Version: 6.2.3
77
;; Author: Phil Hagelberg, Doug Alcorn, and Will Farrington
88
;; Maintainer: Chen Bin <chenbin.sh@gmail.com>
99
;; URL: https://github.com/redguardtoo/find-file-in-project
@@ -177,13 +177,22 @@
177177
:group 'convenience)
178178

179179
(defcustom ffip-use-rust-fd nil
180-
"Use rust fd instead of find."
180+
"Use rust fd instead of GNU find."
181181
:link '(url-link :tag "fd @ GitHub"
182182
"https://github.com/sharkdp/fd")
183183
:group 'ffip
184184
:type 'boolean
185185
:safe #'booleanp)
186186

187+
(defcustom ffip-rust-fd-executable-name "fd"
188+
"Rust fd executable name."
189+
:group 'ffip
190+
:type 'string)
191+
192+
(defcustom ffip-gnu-find-executable-name "find"
193+
"GNU find executable name."
194+
:group 'ffip
195+
:type 'string)
187196

188197
(defcustom ffip-rust-fd-respect-ignore-files t
189198
"Don't show search results from '.*ignore' files."
@@ -612,7 +621,8 @@ If CHECK-ONLY is true, only do the check."
612621

613622
(defun ffip--executable-find ()
614623
"Find EXE on all environments."
615-
(let* ((exe (if ffip-use-rust-fd "fd" "find"))
624+
(let* ((exe (if ffip-use-rust-fd ffip-rust-fd-executable-name
625+
ffip-gnu-find-executable-name))
616626
rlt)
617627
(cond
618628
((file-remote-p default-directory)

‎pkg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
name=find-file-in-project
3-
version=6.2.2
3+
version=6.2.3
44
pkg=$name-$version
55
mkdir $pkg
66
cp *.el $pkg

0 commit comments

Comments
 (0)