Enable .NET CLI Tab Completion
Below is a PowerShell snippet you can use to enable tab completion for the .NET CLI! Put this snippet into a PowerShell Profile, load it on startup and enable tab completion for your .NET commands.
# PowerShell parameter completion shim for the dotnet CLI
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
dotnet complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
Reference
You can read more on How to enable TAB completion for the .NET CLI where they also give code snippets to enable tab completion across multiple shells.