Closed cdhunt closed 1 year ago
This doesn't work on exported functions in PowerShell 7. The only way Get-ModuleCommand
works as expected in PowerShell 7 is if you first import the module so that the prefix is applied.
The prefix can be pulled from $mod.prefix
and I guess some string formatting can be done where $PSVersionTable.PSVersion -ge 7.0
?
Since Microsoft agrees there is a PowerShell 7 bug, I'm going to hold off on doing anything. This is only an issue when using -ListAvailable
in PowerShell 7. This isn't a problem if the module has been imported with the prefix first.
Ignoring the issue for now, and this PR is so far out of alignment with the current state of the project with too many merge conflicts to manage.
It looks like this is only an issue for binary cmdlets and ToString() on the CmdletInfo object returns the prefixed command name.
Fixes #112