From b9a274955172a8736aa79f4baaf47c834228edb0 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 18 Jul 2019 14:43:07 +0000 Subject: [PATCH] [zsh] audacious-hack: support multiple directories and only match audio files --- home/.zshrc.local | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/.zshrc.local b/home/.zshrc.local index f5c2633..3515246 100644 --- a/home/.zshrc.local +++ b/home/.zshrc.local @@ -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