dotnet-installer/scripts/register-completions.ps1

7 lines
385 B
PowerShell
Raw Normal View History

2017-03-06 12:08:26 -08:00
# PowerShell parameter completion shim for the dotnet CLI
2017-03-02 19:36:51 -08:00
Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
dotnet complete --position $cursorPosition "$wordToComplete" | ForEach-Object {
2017-03-02 19:36:51 -08:00
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}