-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdotnet
More file actions
executable file
·26 lines (20 loc) · 746 Bytes
/
dotnet
File metadata and controls
executable file
·26 lines (20 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install?tabs=dotnet10&pivots=os-linux-ubuntu-2404#ubuntu-2404
sudo apt install -y dotnet-sdk-10.0 aspnetcore-runtime-10.0
# https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#zsh
cat >~/.local/share/zsh-completion/_dotnet <<'EOL'
#compdef dotnet
_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_zsh_complete dotnet
EOL