You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet: set up tab completions for SDK 10+ (#1596)
* dotnet: set up tab completions for SDK 10+
Generate bash, zsh, and fish completion scripts using 'dotnet completions
script' and place them in the standard system-wide completion directories:
- /usr/share/bash-completion/completions/dotnet
- /usr/share/zsh/site-functions/_dotnet
- /usr/share/fish/vendor_completions.d/dotnet.fish
Gated behind SDK 10+ via version check since the 'dotnet completions script'
command is only available starting with .NET 10. Skipped for runtime-only
installs.
Reference: https://learn.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete
* Add tab completion assertions
* Sync dotnet docs options with feature metadata
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
91
91
92
92
`bash` is required to execute the `install.sh` script.
93
+
94
+
## Tab completions
95
+
96
+
When using .NET SDK 10 or newer, tab completions for the `dotnet` CLI are automatically installed for bash, zsh, and fish. The completion scripts are placed in the standard system-wide directories so they work for all users:
Copy file name to clipboardExpand all lines: src/dotnet/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ This Feature installs the latest .NET SDK, which includes the .NET CLI and the s
20
20
| dotnetRuntimeVersions | Enter additional .NET runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | - |
21
21
| aspNetCoreRuntimeVersions | Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases. | string | - |
22
22
| workloads | Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install. | string | - |
23
+
| tabCompletions | Install shell tab completions for the dotnet CLI. Requires SDK 10 or newer. | boolean | true |
23
24
24
25
## Customizations
25
26
@@ -85,7 +86,7 @@ Installing only the .NET Runtime or the ASP.NET Core Runtime. (The SDK includes
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
@@ -39,6 +39,11 @@
39
39
"type": "string",
40
40
"default": "",
41
41
"description": "Enter additional .NET SDK workloads, separated by commas. Use 'dotnet workload search' to learn what workloads are available to install."
42
+
},
43
+
"tabCompletions": {
44
+
"type": "boolean",
45
+
"default": true,
46
+
"description": "Install shell tab completions for the dotnet CLI. Requires SDK 10 or newer."
0 commit comments