Skip to content

Commit c4a7191

Browse files
Fix .NET 10 CLI auto-completion command from 'generate' to 'script' (#50050)
* Initial plan * Fix .NET 10 CLI auto completion command from 'generate' to 'script' Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com>
1 parent c4ede72 commit c4a7191

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/core/tools/enable-tab-autocomplete.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Starting with .NET 10, the .NET CLI includes native shell completion scripts tha
2020

2121
### Generate completion scripts
2222

23-
Use the `dotnet completions generate` command to generate a completion script for your shell:
23+
Use the `dotnet completions script` command to generate a completion script for your shell:
2424

2525
```console
26-
dotnet completions generate [SHELL]
26+
dotnet completions script [SHELL]
2727
```
2828

2929
The `[SHELL]` parameter accepts one of the following values:
@@ -62,39 +62,39 @@ Add the appropriate command to your shell's profile to enable native completions
6262
Add the following line to your PowerShell profile (`$PROFILE`):
6363

6464
```powershell
65-
dotnet completions generate pwsh | Out-String | Invoke-Expression
65+
dotnet completions script pwsh | Out-String | Invoke-Expression
6666
```
6767

6868
#### Bash
6969

7070
Add the following line to your `.bashrc` file:
7171

7272
```bash
73-
eval "$(dotnet completions generate bash)"
73+
eval "$(dotnet completions script bash)"
7474
```
7575

7676
#### Zsh
7777

7878
Add the following line to your `.zshrc` file:
7979

8080
```zsh
81-
eval "$(dotnet completions generate zsh)"
81+
eval "$(dotnet completions script zsh)"
8282
```
8383

8484
#### Fish
8585

8686
Add the following line to your `config.fish` file:
8787

8888
```fish
89-
dotnet completions generate fish | source
89+
dotnet completions script fish | source
9090
```
9191

9292
#### Nushell
9393

9494
Add the following to the beginning of your `config.nu` file:
9595

9696
```nu
97-
dotnet completions generate nushell | save -f ~/.local/share/nushell/completions/dotnet.nu
97+
dotnet completions script nushell | save -f ~/.local/share/nushell/completions/dotnet.nu
9898
use ~/.local/share/nushell/completions/dotnet.nu *
9999
```
100100

docs/core/whats-new/dotnet-10/sdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ The `--interactive` flag is now enabled by default for CLI commands in interacti
251251
252252
## Native shell tab-completion scripts
253253
254-
The `dotnet` CLI now supports generating native tab-completion scripts for popular shells using the `dotnet completions generate [SHELL]` command. Supported shells include `bash`, `fish`, `nushell`, `powershell`, and `zsh`. These scripts improve usability by providing faster and more integrated tab-completion features. For example, in PowerShell, you can enable completions by adding the following to your `$PROFILE`:
254+
The `dotnet` CLI now supports generating native tab-completion scripts for popular shells using the `dotnet completions script [SHELL]` command. Supported shells include `bash`, `fish`, `nushell`, `powershell`, and `zsh`. These scripts improve usability by providing faster and more integrated tab-completion features. For example, in PowerShell, you can enable completions by adding the following to your `$PROFILE`:
255255
256256
```powershell
257-
dotnet completions script pwsh | out-String | Invoke-Expression -ErrorAction SilentlyContinue
257+
dotnet completions script pwsh | Out-String | Invoke-Expression
258258
```
259259
260260
## Console apps can natively create container images

0 commit comments

Comments
 (0)