mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
10 lines
428 B
PowerShell
10 lines
428 B
PowerShell
$fn = $($MyInvocation.MyCommand.Name)
|
|
$name = $fn -replace "(.*)\.ps1$", '$1'
|
|
Register-ArgumentCompleter -Native -CommandName $name -ScriptBlock {
|
|
param($commandName, $wordToComplete, $cursorPosition)
|
|
$other = "$wordToComplete --generate-shell-completion"
|
|
Invoke-Expression $other | ForEach-Object {
|
|
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
|
}
|
|
}
|