Use extended globbing instead of tr

This commit is contained in:
Dylan 2016-03-27 14:13:27 +11:00
parent 6296cf7410
commit 423af0cd48

View file

@ -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)
;;