dotnet-installer/scripts/register-completions.bash

14 lines
348 B
Bash
Raw Normal View History

2017-03-02 19:36:51 -08:00
#!/bin/bash
2017-03-06 12:08:26 -08:00
# bash parameter completion for the dotnet CLI
2017-03-02 19:36:51 -08:00
_dotnet_bash_complete()
{
local word=${COMP_WORDS[COMP_CWORD]}
local dotnetPath=${COMP_WORDS[1]}
2017-03-06 12:08:26 -08:00
local completions=("$(dotnet complete --position ${COMP_POINT} "${COMP_LINE}")")
2017-03-02 19:36:51 -08:00
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}
complete -f -F _dotnet_bash_complete dotnet