-
Notifications
You must be signed in to change notification settings - Fork 510
Psremoting with Prefix causes intellisense to go wild #2584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Psremoting with Prefix causes intellisense to go wild #2584
Comments
This happens when i highlight an area in the command with the mouse to copy or paste information |
This is likely caused by the same root problem I came across with the RemoteDesktop module that I ran into here. |
@nakosenk did you also import the module with a prefix? |
I did not import it with a prefix, but it's one of the few Microsoft modules that specifies a Prefix in its module manifest. |
Very good to know. |
Thanks for the info, @bobthewonderdog ! Can you also attach the logs here so we can get a better idea of what's going on? |
For each item you are looking at in intellisense, we run The odd part here is that for cmdlets that use prefix, You can verify this in PowerShell: Import-PSSession $EXOSession -prefix O365 -AllowClobber
Get-Command "New-O365ActiveSyncDeviceAccessRule" | Get-Help When I run that ^ (well for me I just imported a module with a prefix...) the progress text shows:
with the duplicate prefix... but the operation seems to work as expected... That makes this (and @nakosenk's issue) a PowerShell bug which has two problems:
Can one of you open an issue on each of these things over in https://github.com/PowerShell/PowerShell |
I think given |
I haven't had a chance to try it, but the underlying problem might be with CommandInfo.ToString(). When converting a CommandInfo object to a string, it duplicates the prefix, but accessing the Name property gives the correct correct name. In CommandHelpers.cs, when it builds the call to Get-Command, it passes the name of the command directly which does not duplicate the prefix. But when building the call to Get-Help, it passes the whole CommandInfo object. Changing the argument to be |
@nakosenk yep great find. I was just about to make that exact change :) Please do open an issue on PowerShell about |
PR out (for the extension) ^ |
Hi all,
I am using the powershell preview and vscode insiders.
I import a module with a prefix eg.
Import-PSSession $EXOSession -prefix O365 -AllowClobber
when i run any commands i get this issue and the console locks up and cannot be recovered until it has finished searching help
Notice it doubles the Prefix in searching help.
Get-Help 100% Searching Help for New-O365O365ActiveSyncDeviceAccessRule ...
Get-Help 100% Searching Help for New-O365O365ActiveSyncDeviceAccessRule ...
Get-Help 100% Searching Help for New-O365O365ActiveSyncDeviceAccessRule ...
Get-Help 100% Searching Help for New-O365O365Mailbox ...
Get-Help 100% Searching Help for New-O365O365Mailbox ...
Get-Help 10% Searching Help for New-O365O365Mailbox ...
The text was updated successfully, but these errors were encountered: