48ccc7b36de8efb2bd7beb9bd6e0a6f6fe03b95d
- Author
- Jasmin <nachtjasmin@posteo.de>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(dotnet): update completion script (#12028)
Diff
1diff --git a/plugins/dotnet/dotnet.plugin.zsh b/plugins/dotnet/dotnet.plugin.zsh
2index 89d464670257e6a7c046904139a3ae26b7924b4e..40ee7efaeafb507675f093813f45281aa35357de 100644
3--- a/plugins/dotnet/dotnet.plugin.zsh
4+++ b/plugins/dotnet/dotnet.plugin.zsh
5@@ -1,22 +1,14 @@
6 # This scripts is copied from (MIT License):
7-# https://github.com/dotnet/toolset/blob/master/scripts/register-completions.zsh
8+# https://raw.githubusercontent.com/dotnet/sdk/main/scripts/register-completions.zsh
9
10-_dotnet_zsh_complete()
11-{
12- local completions=("$(dotnet complete "$words")")
13-
14- # If the completion list is empty, just continue with filename selection
15- if [ -z "$completions" ]
16- then
17- _arguments '*::arguments: _normal'
18- return
19- fi
20-
21- # This is not a variable assignment, don't remove spaces!
22- _values = "${(ps:\n:)completions}"
23+#compdef dotnet
24+_dotnet_completion() {
25+ local -a completions=("${(@f)$(dotnet complete "${words}")}")
26+ compadd -a completions
27+ _files
28 }
29
30-compdef _dotnet_zsh_complete dotnet
31+compdef _dotnet_completion dotnet
32
33 # Aliases bellow are here for backwards compatibility
34 # added by Shaun Tabone (https://github.com/xontab)