From 067c200b717ebb34b44721b277b8470977c684c1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 10 Jun 2016 19:46:00 +1000 Subject: [PATCH] Simplified image shuffle, thanks @aranega --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index a0ac4f44..616b13e9 100755 --- a/neofetch +++ b/neofetch @@ -2264,8 +2264,8 @@ getimage () { "wall") getwallpaper ;; "ascii") getascii; return ;; *) - if [ "${image: -1}" == "/" ]; then - files=("$image"*.png "$image"*.jpg) + if [ -d "$image" ]; then + files=("$image"*.{png,jpg,jpeg}) img="$(printf "%s" "${files[RANDOM % (${#files[@]} - 1)]}")" else img="$image"