Commit 1278844d authored by Dylan Araps's avatar Dylan Araps

general: fixed config issue. Closes #1088

parent 380f889f
...@@ -4081,19 +4081,19 @@ get_full_path() { ...@@ -4081,19 +4081,19 @@ get_full_path() {
get_user_config() { get_user_config() {
mkdir -p "${XDG_CONFIG_HOME}/neofetch/" mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
shopt -s nullglob
files=("$XDG_CONFIG_HOME"/neofetch/confi*)
shopt -u nullglob
# --config /path/to/config.conf # --config /path/to/config.conf
if [[ -f "$config_file" ]]; then if [[ -f "$config_file" ]]; then
source "$config_file" source "$config_file"
err "Config: Sourced user config. (${config_file})" err "Config: Sourced user config. (${config_file})"
return return
elif [[ -f "${files[0]}" ]]; then elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then
source "${files[0]}" source "${XDG_CONFIG_HOME}/neofetch/config.conf"
err "Config: Sourced user config. (${files[0]})" err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config.conf)"
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)"
else else
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment