dotnet.plugin.zsh 882 B

12345678910111213141516171819202122232425262728293031323334
  1. # This scripts is copied from (MIT License):
  2. # https://github.com/dotnet/toolset/blob/master/scripts/register-completions.zsh
  3. _dotnet_zsh_complete()
  4. {
  5. local completions=("$(dotnet complete "$words")")
  6. # If the completion list is empty, just continue with filename selection
  7. if [ -z "$completions" ]
  8. then
  9. _arguments '*::arguments: _normal'
  10. return
  11. fi
  12. # This is not a variable assignment, don't remove spaces!
  13. _values = "${(ps:\n:)completions}"
  14. }
  15. compdef _dotnet_zsh_complete dotnet
  16. # Aliases bellow are here for backwards compatibility
  17. # added by Shaun Tabone (https://github.com/xontab)
  18. alias dn='dotnet new'
  19. alias dr='dotnet run'
  20. alias dt='dotnet test'
  21. alias dw='dotnet watch'
  22. alias dwr='dotnet watch run'
  23. alias dwt='dotnet watch test'
  24. alias ds='dotnet sln'
  25. alias da='dotnet add'
  26. alias dp='dotnet pack'
  27. alias dng='dotnet nuget'
  28. alias db='dotnet build'