Skip to content

Commit

Permalink
fix(aspell): use _comp_expand_glob against unexpected splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jan 14, 2024
1 parent b63d25a commit 58d5176
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions completions/aspell
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58d5176

Please sign in to comment.