add dotnet completions

This commit is contained in:
Seaswimmer 2024-10-27 20:03:59 -04:00
parent cf25a69995
commit 993c4968c5
Signed by: cswimr
GPG key ID: A9C162E867C851FA

19
.zshc/completion/dotnet.zsh Executable file
View file

@ -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