2020-02-15 18:19:57 +00:00
|
|
|
# This scripts is copied from (MIT License):
|
|
|
|
# https://github.com/dotnet/toolset/blob/master/scripts/register-completions.zsh
|
2019-12-29 04:54:58 +00:00
|
|
|
|
2020-02-15 18:19:57 +00:00
|
|
|
_dotnet_zsh_complete()
|
|
|
|
{
|
|
|
|
local completions=("$(dotnet complete "$words")")
|
2019-12-29 04:54:58 +00:00
|
|
|
|
2020-02-15 18:19:57 +00:00
|
|
|
# If the completion list is empty, just continue with filename selection
|
|
|
|
if [ -z "$completions" ]
|
|
|
|
then
|
|
|
|
_arguments '*::arguments: _normal'
|
|
|
|
return
|
|
|
|
fi
|
2019-12-29 04:54:58 +00:00
|
|
|
|
2021-12-01 11:20:31 +00:00
|
|
|
# This is not a variable assignment, don't remove spaces!
|
2020-02-15 18:19:57 +00:00
|
|
|
_values = "${(ps:\n:)completions}"
|
2019-12-29 04:54:58 +00:00
|
|
|
}
|
|
|
|
|
2020-02-15 18:19:57 +00:00
|
|
|
compdef _dotnet_zsh_complete dotnet
|
2019-12-29 04:54:58 +00:00
|
|
|
|
2020-02-15 18:19:57 +00:00
|
|
|
# Aliases bellow are here for backwards compatibility
|
|
|
|
# added by Shaun Tabone (https://github.com/xontab)
|
2019-12-29 04:54:58 +00:00
|
|
|
|
|
|
|
alias dn='dotnet new'
|
|
|
|
alias dr='dotnet run'
|
|
|
|
alias dt='dotnet test'
|
2020-02-11 00:39:20 +00:00
|
|
|
alias dw='dotnet watch'
|
|
|
|
alias dwr='dotnet watch run'
|
2023-02-01 09:51:31 +00:00
|
|
|
alias dwt='dotnet watch test'
|
2019-12-29 04:54:58 +00:00
|
|
|
alias ds='dotnet sln'
|
|
|
|
alias da='dotnet add'
|
|
|
|
alias dp='dotnet pack'
|
|
|
|
alias dng='dotnet nuget'
|
2021-11-27 01:23:08 +00:00
|
|
|
alias db='dotnet build'
|