about summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2021-09-13 23:09:25 +0600
committerNRK <nrk@disroot.org>2021-09-13 23:09:25 +0600
commit6b674f2c89247c35065b2141c48a38ebeb4e55ad (patch)
tree405848b502779cc396e9f7779f3fdb98e7b4e65b /examples
parent8ca27cd891e7fb35b0c0f5e498e8f886bd053b1a (diff)
downloadranger-6b674f2c89247c35065b2141c48a38ebeb4e55ad.tar.gz
use more posix complaint flags
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/rifle_sxiv.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/rifle_sxiv.sh b/examples/rifle_sxiv.sh
index b8a51a64..ec55b249 100755
--- a/examples/rifle_sxiv.sh
+++ b/examples/rifle_sxiv.sh
@@ -14,8 +14,10 @@
 tmp="/tmp/sxiv_rifle_$$"
 
 listfiles () {
-    find -L "///${1%/*}" -maxdepth 1 -type f -iregex \
-      '.*\.\(jpe?g\|png\|gif\|webp\|tiff\|bmp\)$' -print | sort | tee "$tmp"
+    find -L "///${1%/*}" \( ! -path "///${1%/*}" -prune \) -type f \
+      \( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' \
+      -o -name '*.webp' -o -name '*.tiff' -o -name '*.bmp' \) -print |
+      sort | tee "$tmp"
 }
 
 is_img () {