You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide the tab-completions of an alias' target command on the alias itself also when targeting native programs #21609
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 makes Get-Date's tab-completions available on gdt calls too.
By contrast, say you've used Register-ArgumentCompleter to define completions for pwsh, and you've also defined Set-Alias psh pwsh; currently, psh unexpectedly does not use the tab-completions defined for pwsh.
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 `pwshSet-Alias psh pwsh
psh -# pressing TAB right after the "-" does NOT offer the -foo and -bar completions.
Activity