fix: use old auto-completion for 0.9.x compat
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

See toolshed/organising#644

Partial revert of 1f8662cd95
This commit is contained in:
2024-10-27 08:54:43 +01:00
parent 1f9b863be0
commit b313b0a145
4 changed files with 24 additions and 41 deletions

View File

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