Skip to content

Commit

Permalink
Completely fix bash autocomplete handling of filenames with spaces (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
wr7 authored and mtoohey31 committed Jun 2, 2024
1 parent d102d2f commit 1554c0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/completion/hx.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ _hx() {

case "$3" in
-g | --grammar)
COMPREPLY="$(compgen -W "fetch build" -- $2)"
COMPREPLY="$(compgen -W 'fetch build' -- $2)"
;;
--health)
local languages=$(hx --health |tail -n '+7' |awk '{print $1}' |sed 's/\x1b\[[0-9;]*m//g')
COMPREPLY="$(compgen -W "$languages" -- $2)"
COMPREPLY="$(compgen -W """$languages""" -- $2)"
;;
*)
COMPREPLY="$(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- $2)"
COMPREPLY="$(compgen -fd -W "-h --help --tutor -V --version -v -vv -vvv --health -g --grammar --vsplit --hsplit -c --config --log" -- """$2""")"
;;
esac

Expand Down

0 comments on commit 1554c0e

Please sign in to comment.