about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xexamples/rifle_sxiv.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rifle_sxiv.sh b/examples/rifle_sxiv.sh
index 5fab6b78..5b096eaa 100755
--- a/examples/rifle_sxiv.sh
+++ b/examples/rifle_sxiv.sh
@@ -31,10 +31,10 @@ case "$1" in
     *)  target="$PWD/$1" ;;
 esac
 
-[ -f "$target" ] && count="$(listfiles | grep -m 1 -ZznF "$target" | cut -d: -f1)"
+[ -f "$target" ] && count="$(listfiles | grep -m 1 -ZznF "$target")"
 
 if [ -n "$count" ]; then
-    listfiles | xargs -0 sxiv -n "$count" --
+    listfiles | xargs -0 sxiv -n "${count%%:*}" --
 else
     sxiv -- "$@" # fallback
 fi