diff --git a/.zshc/completion/dotnet.zsh b/.zshc/completion/dotnet.zsh new file mode 100755 index 0000000..b50646e --- /dev/null +++ b/.zshc/completion/dotnet.zsh @@ -0,0 +1,19 @@ +# zsh parameter completion for the dotnet CLI + +_dotnet_zsh_complete() +{ + local completions=("$(dotnet complete "$words")") + + # If the completion list is empty, just continue with filename selection + if [ -z "$completions" ] + then + _arguments '*::arguments: _normal' + return + fi + + # This is not a variable assignment, don't remove spaces! + _values = "${(ps:\n:)completions}" +} + +compdef _dotnet_zsh_complete dotnet +