From a3b26d131bc7fae8a789e74abc01cce4b1bafb91 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 17 Jan 2017 14:52:25 +1100 Subject: [PATCH] Args: Rename --image_{source,backend} to {source,backend} --- neofetch | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/neofetch b/neofetch index 52e37595..fd0015a7 100755 --- a/neofetch +++ b/neofetch @@ -3918,16 +3918,15 @@ get_args() { "--disk_display") disk_display="$2" ;; # Image backend - "--image_backend") image_backend="$2" ;; - "--image_source") image_source="$2" ;; - "--ascii") image_backend="ascii" ;; - "--caca") image_backend="caca" ;; - "--catimg") image_backend="catimg" ;; - "--jp2a") image_backend="jp2a" ;; - "--iterm2") image_backend="iterm2" ;; - "--off") image_backend="off" ;; - "--tycat") image_backend="tycat" ;; - "--w3m") image_backend="w3m" ;; + "--backend") image_backend="$2" ;; + "--source") image_source="$2" ;; + "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--tycat" | "--w3m") + image_backend="${1/--}" + case "$2" in + "-"* | "") ;; + *) image_source="$2" ;; + esac + ;; # Image options "--image_size" | "--size") image_size="$2" ;;