From 54cb88f4a6e63acde16ec89f4b6447172219046c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 14 Jan 2017 22:53:36 +1100 Subject: [PATCH] Image: Fixed bugs --- neofetch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 1a959690..b9bbed81 100755 --- a/neofetch +++ b/neofetch @@ -1958,7 +1958,7 @@ image_backend() { get_image_source if [[ ! -f "$image" ]]; then - to_ascii "Image: \'$image_source\' doesn't exist, falling back to ascii mode." + to_ascii "Image: '$image_source' doesn't exist, falling back to ascii mode." return fi @@ -2380,6 +2380,9 @@ to_ascii() { # Print the ascii art. get_ascii 2>/dev/null + # Set cursor position next image/ascii. + printf "%b" "\033[${lines:-0}A\033[9999999D" + # Log the error. err "$1" } @@ -3810,7 +3813,7 @@ exit 1 get_args() { # Check the commandline flags early for '--config'. - [[ "$@" =~ --config ]] || get_user_config 2>/dev/null + [[ "$@" != *--config* ]] && get_user_config 2>/dev/null while [[ "$1" ]]; do case "$1" in