From 58d5176cba8bb25fe5348aadef100c083afa992f Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 31 Dec 2023 21:31:46 +0900 Subject: [PATCH] fix(aspell): use `_comp_expand_glob` against unexpected splitting --- completions/aspell | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/completions/aspell b/completions/aspell index 6b39b165338..89dae17a650 100644 --- a/completions/aspell +++ b/completions/aspell @@ -5,8 +5,7 @@ _comp_cmd_aspell__dictionary() local datadir aspell=$1 datadir=$("$aspell" config data-dir 2>/dev/null || echo /usr/lib/aspell) # First, get aliases (dicts dump does not list them) - COMPREPLY=($datadir/*.alias) - if ((${#COMPREPLY[@]})); then + if _comp_expand_glob COMPREPLY '"$datadir"/*.alias'; then COMPREPLY=("${COMPREPLY[@]%.alias}") COMPREPLY=("${COMPREPLY[@]#$datadir/}") fi