Created
November 21, 2021 19:39
-
-
Save asears/ce6bcadaba7f7e341afea09162d8733f to your computer and use it in GitHub Desktop.
Powershell profile dotnet autocomplete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Path to profile | |
| # Write-Output $PROFILE | |
| # 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', $_) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment