15 lines
290 B
Plaintext
15 lines
290 B
Plaintext
_ghcup()
|
|
{
|
|
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
|