grafana/packaging/autocomplete/powershell_autocomplete.ps1

9 lines
367 B
PowerShell
Raw Normal View History

$name = "grafana"
Register-ArgumentCompleter -Native -CommandName $name -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
$other = "$wordToComplete --generate-bash-completion"
Invoke-Expression $other | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}