Allow `_read_config` to take a path as argument

This commit is contained in:
rwxrob 2021-08-23 23:13:45 -04:00
parent 3acd8e9109
commit c90c3e1af0
No known key found for this signature in database
GPG Key ID: 1CCACEDD2F65578E
1 changed files with 1 additions and 1 deletions

2
cmd
View File

@ -269,7 +269,7 @@ _set_config() {
} }
_read_config() { _read_config() {
local path="$XDG_CONFIG_HOME/$EXE/values" local path=${1:-"$XDG_CONFIG_HOME/$EXE/values"}
[[ -r "$path" ]] || return 0 [[ -r "$path" ]] || return 0
while IFS= read -r line; do while IFS= read -r line; do
[[ $line =~ ^([^=]+)=(.+)$ ]] || continue [[ $line =~ ^([^=]+)=(.+)$ ]] || continue