Skip to content

Option for use ripgrep instead of find in org-fc-awk--find #69

@mithraen

Description

@mithraen

When use org-fc in directory when files with flashcards mixed with files without flash cards, with ripgrep instead of file

It can be done like this:

(defun org-fc-awk--find (paths)
  "Generate shell code to search PATHS for org files.
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
   (if
       org-fc-use-ripgrep
       "rg ^:REVIEW_DATA: -L %s -g \"*.org\" -l -0"
       "find -L %s -name \"*.org\" -not -name \".*\" -print0")
   (mapconcat
    (lambda (path) (shell-quote-argument (expand-file-name path)))
    paths " ")))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions