[zsh] audacious-hack: support multiple directories and only match audio files

legacy
Simon Bruder 2019-07-18 14:43:07 +00:00
parent 1233435b9d
commit b9a2749551
No known key found for this signature in database
GPG Key ID: 6F03E0000CC5B62F
1 changed files with 3 additions and 1 deletions

View File

@ -125,7 +125,9 @@ function mkvextract-all-attachments() {
# Audacious does not support symlinks; hack around that
function audacious-hack() (
IFS=$'\n'
audacious $(/bin/ls -1 $1/**/*(@)|sort -Vd)
for dir in $@; do
/bin/ls -1 $dir/**/*.(flac|m4a|mp3|ogg|opus)(@)
done|sort -Vd|tr '\n' '\0'|xargs -0 audacious
)
# Program aliases/env