Skip to content

Commit

Permalink
option for using ripgrep if installed (closes #69)
Browse files Browse the repository at this point in the history
  • Loading branch information
mithraen committed Dec 20, 2023
1 parent 9b41735 commit 69a3c3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org-fc-awk.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Matches all .org files ignoring ones with names don't start with
a '.' to exclude temporary / backup files.
With the '-L' option, 'find' follows symlinks."
(format
"find -L %s -name \"*.org\" -not -name \".*\" -print0"
(if (and org-fc-use-ripgrep (executable-find "rg"))
"rg ^:FC_CREATED: -L -l --null -g '[^.]*.org' %s"
"find -L %s -name \"*.org\" -not -name \".*\" -print0")
(mapconcat
(lambda (path) (shell-quote-argument (expand-file-name path)))
paths " ")))
Expand Down
5 changes: 5 additions & 0 deletions org-fc-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ Used to generate absolute paths to the awk scripts.")
:type 'function
:group 'org-fc)

(defcustom org-fc-use-ripgrep nil
"Use ripgrep instead of find."
:type 'boolean
:group 'org-fc)

;;;; Org Tags / Properties

(defcustom org-fc-type-property "FC_TYPE"
Expand Down

0 comments on commit 69a3c3d

Please sign in to comment.