Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 588fa17

Browse files
committed
Use --sort-files with rg
1 parent b8326b9 commit 588fa17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playphrase.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def main(media_dir, search_phrase, phrase_mode, phrases_gap, padding, limit, out
282282

283283
rg = shutil.which('rg')
284284
if rg:
285-
cmd = ["rg", "--no-heading", "--null-data", "-N", "-o", "-i", "-g", "*.txt", "-P", search_phrase_in_grep, media_dir]
285+
cmd = ["rg", "--sort-files", "--no-heading", "--null-data", "-N", "-o", "-i", "-g", "*.txt", "-P", search_phrase_in_grep, media_dir]
286286
else:
287287
cmd = ["grep", "-r", "-z", "-o", "-i", "--include", "*.txt", "-P", search_phrase_in_grep, media_dir]
288288
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, bufsize=-1)

0 commit comments

Comments
 (0)