From 9431a593f6ce3e6501635fbb11e54084c6c52df9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 9 Jan 2019 08:48:07 +0200 Subject: [PATCH] ascii: Fixed bug causing ascii files to not work. --- neofetch | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index 0c1cd782..857c7401 100755 --- a/neofetch +++ b/neofetch @@ -3454,12 +3454,13 @@ image_backend() { } get_ascii() { - [[ ! "$image_source" =~ (ascii|auto) ]] && - if [[ -f "$image_source" && ! "$image_source" =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then - ascii_data="$(< "$image_source")" - else - ascii_data="$image_source" - fi + if [[ -f $image_source && ! $image_source =~ (png|jpg|jpeg|jpe|svg|gif) ]]; then + ascii_data="$(< "$image_source")" + elif [[ $image_source == ascii || $image_source == auto ]]; then + : + else + ascii_data="$image_source" + fi # Set locale to get correct padding. LC_ALL="$sys_locale"