ghcup-hs/scripts/shell-completions/bash

15 lines
290 B
Plaintext
Raw Normal View History

2020-04-22 18:12:57 +00:00
_ghcup()
{
2020-04-26 21:32:13 +00:00
local CMDLINE
local IFS=$'\n'
CMDLINE=(--bash-completion-index $COMP_CWORD)
for arg in ${COMP_WORDS[@]}; do
CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg)
done
COMPREPLY=( $(ghcup "${CMDLINE[@]}") )
}
complete -o filenames -F _ghcup ghcup