dotnet.plugin.zsh 852 B

123456789101112131415161718192021222324252627282930313233
  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 ds='dotnet sln'
  24. alias da='dotnet add'
  25. alias dp='dotnet pack'
  26. alias dng='dotnet nuget'
  27. alias db='dotnet build'