Open
Description
Summary of the new feature / enhancement
An alias sensibly sees the same tab-completions as its target command, but, unfortunately and unexpectedly, only if the alias target is a PowerShell commands, and not also for external (native) programs.
-
For instance, defining
Set-Alias gdt Get-Date
makesGet-Date
's tab-completions available ongdt
calls too. -
By contrast, say you've used
Register-ArgumentCompleter
to define completions forpwsh
, and you've also definedSet-Alias psh pwsh
; currently,psh
unexpectedly does not use the tab-completions defined forpwsh
.
This asymmetry should be fixed.
A minimal example:
# Define dummy completions for `pwsh`
Register-ArgumentCompleter -Native -CommandName pwsh -ScriptBlock { '-foo', '-bar' }
# Make `psh` an alias of `pwsh
Set-Alias psh pwsh
psh - # pressing TAB right after the "-" does NOT offer the -foo and -bar completions.
Proposed technical implementation details (optional)
No response