diff options
| author | Tuowen Zhao <ztuowen@gmail.com> | 2023-12-09 13:20:13 -0800 |
|---|---|---|
| committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-12-09 13:20:13 -0800 |
| commit | 7e951c254e779ff0620537cf43ca69dd878387b4 (patch) | |
| tree | cb042e695bb3e11ed0483fad1af8a5b4f1bfc8d8 /plugins/dotnet/dotnet.plugin.zsh | |
| parent | 4d908094fdc2a0c0e9a0a072eba213fab7adef43 (diff) | |
| parent | 48ccc7b36de8efb2bd7beb9bd6e0a6f6fe03b95d (diff) | |
| download | zsh-7e951c254e779ff0620537cf43ca69dd878387b4.tar.gz zsh-7e951c254e779ff0620537cf43ca69dd878387b4.tar.bz2 zsh-7e951c254e779ff0620537cf43ca69dd878387b4.zip | |
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'plugins/dotnet/dotnet.plugin.zsh')
| -rw-r--r-- | plugins/dotnet/dotnet.plugin.zsh | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/plugins/dotnet/dotnet.plugin.zsh b/plugins/dotnet/dotnet.plugin.zsh index 89d464670..40ee7efae 100644 --- a/plugins/dotnet/dotnet.plugin.zsh +++ b/plugins/dotnet/dotnet.plugin.zsh @@ -1,22 +1,14 @@ # This scripts is copied from (MIT License): -# https://github.com/dotnet/toolset/blob/master/scripts/register-completions.zsh +# https://raw.githubusercontent.com/dotnet/sdk/main/scripts/register-completions.zsh -_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 +_dotnet_completion() { + local -a completions=("${(@f)$(dotnet complete "${words}")}") + compadd -a completions + _files } -compdef _dotnet_zsh_complete dotnet +compdef _dotnet_completion dotnet # Aliases bellow are here for backwards compatibility # added by Shaun Tabone (https://github.com/xontab) |
