From 55e9f928071d99323b776e16b4a6e221d1034c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Tue, 6 Dec 2022 19:11:47 +0200 Subject: [PATCH] fix(xdg-mime): mime type array index expansion https://github.com/scop/bash-completion/pull/827#discussion_r1031166072 --- completions/xdg-mime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/xdg-mime b/completions/xdg-mime index 94a2b8b7974..f60fdad5fec 100644 --- a/completions/xdg-mime +++ b/completions/xdg-mime @@ -9,7 +9,7 @@ _xdg_mime_mimetype() command cd "$d" 2>/dev/null || exit 1 compgen -f -o plusdirs -X "!*.xml" -- "$cur" )) || continue - for i in "${!arr[*]}"; do + for i in "${!arr[@]}"; do case ${arr[i]} in packages*) unset -v "arr[i]" ;; # not a MIME type dir *.xml) arr[i]=${arr[i]%.xml} ;;