Unnamed repository; edit this file 'description' to name the repository.
Fix Bash completion space regression (#12828)
Xubai Wang 2025-02-10
parent fcfa70e · commit ff012e8
-rw-r--r--contrib/completion/hx.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/completion/hx.bash b/contrib/completion/hx.bash
index 1b102017..37893bf5 100644
--- a/contrib/completion/hx.bash
+++ b/contrib/completion/hx.bash
@@ -9,23 +9,23 @@ _hx() {
case "$prev" in
-g | --grammar)
- COMPREPLY=($(compgen -W 'fetch build' -- "$cur"))
+ mapfile -t COMPREPLY < <(compgen -W 'fetch build' -- "$cur")
return 0
;;
--health)
languages=$(hx --health | tail -n '+7' | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g')
- COMPREPLY=($(compgen -W """$languages""" -- "$cur"))
+ mapfile -t COMPREPLY < <(compgen -W """$languages""" -- "$cur")
return 0
;;
esac
case "$2" in
-*)
- COMPREPLY=($(compgen -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- """$2"""))
+ mapfile -t COMPREPLY < <(compgen -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- """$2""")
return 0
;;
*)
- COMPREPLY=($(compgen -fd -- """$2"""))
+ mapfile -t COMPREPLY < <(compgen -fd -- """$2""")
return 0
;;
esac