diff options
Diffstat (limited to '.local/share/bash-completion/dotnet')
-rwxr-xr-x | .local/share/bash-completion/dotnet | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.local/share/bash-completion/dotnet b/.local/share/bash-completion/dotnet new file mode 100755 index 0000000..8cd3751 --- /dev/null +++ b/.local/share/bash-completion/dotnet @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# bash parameter completion for the dotnet CLI + +function _dotnet_bash_complete() +{ + local cur="${COMP_WORDS[COMP_CWORD]}" IFS=$'\n' + local candidates + + read -d '' -ra candidates < <(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2>/dev/null) + + read -d '' -ra COMPREPLY < <(compgen -W "${candidates[*]:-}" -- "$cur") +} + + +complete -f -F _dotnet_bash_complete dotnet + |