Skip to content

Commit 56f66e2

Browse files
committed
fix: completion for directory contains ws
Signed-off-by: wxiwnd <wxiwnd@outlook.com>
1 parent cf9a78c commit 56f66e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/bash_pinyin_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ _pinyin_completion() {
8484
# merge result
8585
local -a old_candidates=("${COMPREPLY[@]}")
8686
COMPREPLY=("${old_candidates[@]}" "${pinyin_matched[@]}")
87-
COMPREPLY=($(printf "%s\n" "${COMPREPLY[@]}" | awk '!seen[$0]++'))
87+
mapfile -t COMPREPLY < <(printf "%s\n" "${COMPREPLY[@]}" | awk '!seen[$0]++')
8888

8989
# fix space postfix
9090
if ((${#COMPREPLY[@]} == 1)) && [[ ${COMPREPLY[0]} != */ ]]; then

0 commit comments

Comments
 (0)