diff options
author | NRK <nrk@disroot.org> | 2021-09-13 23:09:25 +0600 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2021-09-13 23:09:25 +0600 |
commit | 6b674f2c89247c35065b2141c48a38ebeb4e55ad (patch) | |
tree | 405848b502779cc396e9f7779f3fdb98e7b4e65b | |
parent | 8ca27cd891e7fb35b0c0f5e498e8f886bd053b1a (diff) | |
download | ranger-6b674f2c89247c35065b2141c48a38ebeb4e55ad.tar.gz |
use more posix complaint flags
-rwxr-xr-x | examples/rifle_sxiv.sh | 6 |
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 () { |