From 423af0cd481b9f928070251b9ad7461c77d62758 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 27 Mar 2016 14:13:27 +1100 Subject: [PATCH] Use extended globbing instead of tr --- neofetch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 6627df2f..072d5e34 100755 --- a/neofetch +++ b/neofetch @@ -430,8 +430,9 @@ config_file="$HOME/.config/neofetch/config" # Gather Info {{{ -# Set no case match +# Set no case match and extended globbing. shopt -s nocasematch +shopt -s extglob # Operating System {{{ @@ -838,7 +839,8 @@ getcpu () { ;; "Mac OS X") - cpu="$(sysctl -n machdep.cpu.brand_string | tr -s \ )" + cpu="$(sysctl -n machdep.cpu.brand_string)" + cpu=${cpu//+( )/ } cores=$(sysctl -n hw.ncpu) ;;