diff options
-rwxr-xr-x | examples/rifle_sxiv.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rifle_sxiv.sh b/examples/rifle_sxiv.sh index d0b5058f..5fab6b78 100755 --- a/examples/rifle_sxiv.sh +++ b/examples/rifle_sxiv.sh @@ -31,7 +31,7 @@ case "$1" in *) target="$PWD/$1" ;; esac -count="$(listfiles | grep -m 1 -ZznF "$target" | cut -d: -f1)" +[ -f "$target" ] && count="$(listfiles | grep -m 1 -ZznF "$target" | cut -d: -f1)" if [ -n "$count" ]; then listfiles | xargs -0 sxiv -n "$count" -- |