Use extended globbing instead of tr
This commit is contained in:
parent
6296cf7410
commit
423af0cd48
1 changed files with 4 additions and 2 deletions
6
neofetch
6
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)
|
||||
;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue