From 535d220e1af9f3e29487cbf01d6827095f0cf3f4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 28 Feb 2016 13:16:48 +1100 Subject: [PATCH] Fix bug with not creating config in stdout mode --- neofetch | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index 05045cc6..3f7234ab 100755 --- a/neofetch +++ b/neofetch @@ -2184,6 +2184,7 @@ getconfig () { source "$config_file" return fi + mkdir -p "$HOME/.config/neofetch/" # Check $HOME/.config/neofetch and create the # dir/files if they don't exist. @@ -2209,10 +2210,11 @@ getconfig () { # Check the commandline flags early for '--config none/off' case "$@" in *"--config off"* | *'--config "off"'* | *"--config 'off'"* | \ - *"--config none"* | *'--config "none"'* | *"--config 'none'"*) + *"--config none"* | *'--config "none"'* | *"--config 'none'"* | *"--stdout"*) config="off" ;; esac +[ "$config" == "on" ] && getconfig # }}} @@ -2463,11 +2465,6 @@ done # Restore cursor and clear screen on ctrl+c trap 'printf "\033[?25h"; clear; exit' 2 -if [ "$config" == "on" ]; then - mkdir -p "$HOME/.config/neofetch/" - getconfig -fi - # Get colors / bold colors bold