...

Text file src/github.com/urfave/cli/v2/autocomplete/powershell_autocomplete.ps1

Documentation: github.com/urfave/cli/v2/autocomplete

     1$fn = $($MyInvocation.MyCommand.Name)
     2$name = $fn -replace "(.*)\.ps1$", '$1'
     3Register-ArgumentCompleter -Native -CommandName $name -ScriptBlock {
     4     param($commandName, $wordToComplete, $cursorPosition)
     5     $other = "$wordToComplete --generate-bash-completion"
     6         Invoke-Expression $other | ForEach-Object {
     7            [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
     8         }
     9 }

View as plain text