mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Fix the whitespace issue | get rid of ls and sort
This commit is contained in:
parent
8a3cf1e6e0
commit
f2e89ab984
@ -38,7 +38,10 @@ cmd open ${{
|
|||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
dir="$0"
|
dir="$0"
|
||||||
selected_file="$1"
|
selected_file="$1"
|
||||||
images=($(ls "$dir"/*.{jpg,jpeg,png,webp,bmp,tiff,tif,raw,ico,exif,heic,heif,gif,avif,jxl} | sort -V))
|
images=()
|
||||||
|
for file in "$dir"/*.{jpg,jpeg,png,webp,bmp,tiff,tif,raw,ico,exif,heic,heif,gif,avif,jxl,JPG,PNG}; do
|
||||||
|
[[ -f "$file" ]] && images+=("$file")
|
||||||
|
done
|
||||||
for ((i=0; i<${#images[@]}; i++)); do
|
for ((i=0; i<${#images[@]}; i++)); do
|
||||||
[[ "${images[i]}" = "$selected_file" ]] && {
|
[[ "${images[i]}" = "$selected_file" ]] && {
|
||||||
sxiv -abiof "${images[@]:i}" "${images[@]:0:i}"
|
sxiv -abiof "${images[@]:i}" "${images[@]:0:i}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user