Use beet config -p to update BEETS_CONFIG

This commit is contained in:
vapniks 2018-05-10 13:06:31 +01:00 committed by GitHub
parent 7e0fbef9fe
commit 5b9cebe9a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ dirs=("$matchany" ':dir:directory:_dirs')
# Retrieve or update caches
if ! _retrieve_cache beetslibrary || _cache_invalid beetslibrary; then
local BEETS_LIBRARY="${$(beet config|grep library|cut -f 2 -d ' '):-${BEETS_LIBRARY}}"
local BEETS_CONFIG="$(dirname ${BEETS_LIBRARY})/config.yaml"
local BEETS_CONFIG="${$(beet config -p):-${BEETS_CONFIG}}"
_store_cache beetslibrary BEETS_LIBRARY BEETS_CONFIG
fi