about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-09-18 23:53:53 +0600
committerNRK <nrk@disroot.org>2021-09-18 23:53:53 +0600
commit8e4d2d396b9876c240c3a4d7a82296a57a358706 (patch)
treeaee9829921e388dfa89e87affe8077a6074aa9b9
parenta9101682c1a6efb0a06ef1ccc334e3aa8e75bf1b (diff)
downloadranger-8e4d2d396b9876c240c3a4d7a82296a57a358706.tar.gz
use grep -iE instead of -iname
-rwxr-xr-xexamples/rifle_sxiv.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/rifle_sxiv.sh b/examples/rifle_sxiv.sh
index 7148d92c..45a13f28 100755
--- a/examples/rifle_sxiv.sh
+++ b/examples/rifle_sxiv.sh
@@ -14,9 +14,8 @@
 tmp="/tmp/sxiv_rifle_$$"
 
 listfiles () {
-    find -L "///${1%/*}" \( ! -path "///${1%/*}" -prune \) -type f \
-      \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' -o -iname '*.gif' \
-      -o -iname '*.webp' -o -iname '*.tiff' -o -iname '*.bmp' \) -print |
+    find -L "///${1%/*}" \( ! -path "///${1%/*}" -prune \) -type f |
+      grep -iE '\.(jpe?g|png|gif|webp|tiff|bmp)$' |
       sort | tee "$tmp"
 }