PowerShellEditorServices
PowerShellEditorServices copied to clipboard
Sometimes when typing `[type]::` you get no completions
This happens because we get a completion request for [type]: which gets no results and for some reason isn't marked as incomplete. Need to look into how to fix that.
It can also happen when typing something like: Get-NetAdapter - or Get-Disk - but only if you've CD'ed into an empty folder and the modules haven't been imported yet.
Are there any new updates? Has this been abandoned? It sounds like it used to be a higher priority but is now on the back burner?
Thanks for any information you can provide!
If anyone finds this helpful, I have started using a PS 7 session in ISE so that I can have the desired IntelliSense experience. It looks a bit odd/clunky but has been working for me so far.
$Process = Start-Process PWSH -ArgumentList @("-NoExit") -PassThru -WindowStyle Hidden
function New-OutOfProcRunspace {
param($ProcessId)
$ci = New-Object -TypeName System.Management.Automation.Runspaces.NamedPipeConnectionInfo -ArgumentList @($ProcessId)
$tt = [System.Management.Automation.Runspaces.TypeTable]::LoadDefaultTypeFiles()
$Runspace = [System.Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace($ci, $Host, $tt)
$Runspace.Open()
$Runspace
}
$Host.PushRunspace($(New-OutOfProcRunspace -ProcessId $Process.Id))
There's a more manual, but easier to remember way: Launch pwsh and type in $pid. Copy the pid and from ISE type in Enter-PSHostProcess 123 (the PID from before).
It's nice to not only get a better IntelliSense experience, but also better syntax highlighting (even if it doesn't support the newer syntax sugar).