mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Merge pull request #1542 from minijackson/patch-1
Add default library location fallback for zsh completion
This commit is contained in:
commit
ab5a4e2450
1 changed files with 10 additions and 6 deletions
|
|
@ -18,6 +18,10 @@ function _beet_field_values()
|
||||||
{
|
{
|
||||||
local -a output fieldvals
|
local -a output fieldvals
|
||||||
local library="$(beet config|grep library|cut -f 2 -d ' ')"
|
local library="$(beet config|grep library|cut -f 2 -d ' ')"
|
||||||
|
if [ -z "$library" ]; then
|
||||||
|
# Use default library location if there is no user defined one
|
||||||
|
library="~/.config/beets/library.db"
|
||||||
|
fi
|
||||||
output=$(sqlite3 ${~library} "select distinct $1 from items;")
|
output=$(sqlite3 ${~library} "select distinct $1 from items;")
|
||||||
case $1
|
case $1
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue