Allow `_read_config` to take a path as argument
This commit is contained in:
parent
3acd8e9109
commit
c90c3e1af0
2
cmd
2
cmd
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue