Blame SOURCES/register-completions.bash

aeda09
# bash parameter completion for the dotnet CLI
aeda09
aeda09
_dotnet_bash_complete()
aeda09
{
aeda09
  local word=${COMP_WORDS[COMP_CWORD]}
aeda09
aeda09
  local completions
aeda09
  completions="$(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null)"
aeda09
  if [ $? -ne 0 ]; then
aeda09
    completions=""
aeda09
  fi
aeda09
aeda09
  COMPREPLY=( $(compgen -W "$completions" -- "$word") )
aeda09
}
aeda09
aeda09
complete -f -F _dotnet_bash_complete dotnet