From 25400f7f0045aeddc4789d8d0e1b7bc9295a45bc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 22 Dec 2016 18:20:57 +1100 Subject: [PATCH] General: Save the old $IFS value --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index ee11dd98..3a1b2c4e 100755 --- a/neofetch +++ b/neofetch @@ -25,6 +25,9 @@ shopt -s nocasematch # Reset colors and bold. reset="\033[0m" +# Save default IFS value. +old_ifs="$IFS" + # DETECT INFORMATION get_os() { @@ -968,6 +971,7 @@ get_gpu() { "Linux") IFS=$'\n' gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}')) + IFS="$old_ifs" # Number the GPUs if more than one exists. (( "${#gpus[@]}" > 1 )) && gpu_num=1