Conditional search queries for Music Player Daemon (MPD).
$ mpseek '[condition] [keywords...]'
$ mpseek jazz
$ mpseek '"michael jackson" album!=thriller'
$ mpseek "genre=mpb|latin|soca brazil"
$ mpseek 'genre="hip hop" && date>1990'
$ mpseek "( genre=funk || album=funk ) && file=flac$"
bash
awk
xargs
mpc
#!/usr/bin/env bash
while true; do
clear
query=""
read -p '> ' -e query
if (( ${#query} )); then
history -s "$query"
mpc clear >&-
mpseek "$query" | mpc add
fi
done