Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
2 contributors

Users who have contributed to this file

@jonsequitur @wli3
17 lines (13 sloc) 810 Bytes
# dotnet suggest shell start
$availableToComplete = (dotnet-suggest list) | Out-String
$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries)
Register-ArgumentCompleter -Native -CommandName $availableToCompleteArray -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
$fullpath = (Get-Command $wordToComplete.CommandElements[0]).Source
$arguments = $wordToComplete.Extent.ToString().Replace('"', '\"')
dotnet-suggest get -e $fullpath --position $cursorPosition -- "$arguments" | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
$env:DOTNET_SUGGEST_SCRIPT_VERSION = "1.0.0"
# dotnet suggest script end
You can’t perform that action at this time.