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
No-argument tab-completion fails with Get-Process on macOS, possibly due to process objects lacking a ProcessName property #7174
Get-Process# < -- press <tab> here (whether once or multiple times makes no difference)
On Windows and Linux you get the names of all running processes, but on macOS nothing happens.
Expected behavior
A list (menu) of the names of all running processes.
Actual behavior
Nothing happens at all.
The problem goes away once you've typed at least prefix char. of the process name to match.
Presumed cause:
On macOS, many processes output by Get-Process lack a .Name aka .ProcessName value.
As an aside: Is that expected or a bug in itself?
It seems that these entries without a .Name value cause the problem when the list of completions is constructed:
Jason Shirk (@lzybkr) provided the following code to diagnose the problem, which simulates what happens when you tab-complete, while also surfacing exceptions:
The above, rather than outputting a [System.Management.Automation.CommandCompletion] object with all process names, reports the following error:
Exception calling "CompleteInput" with "3" argument(s): "Cannot process argument because the value of argument "listItemText" is null. Change the value of argument "listItemText"
...
changed the title [-]No-argument tab-completion fails with Get-Process on macOS, possibly due to process objects lacking a ProcessName entry[/-][+]No-argument tab-completion fails with Get-Process on macOS, possibly due to process objects lacking a ProcessName property[/+]on Jun 25, 2018
Activity
[-]No-argument tab-completion fails with Get-Process on macOS, possibly due to process objects lacking a ProcessName entry[/-][+]No-argument tab-completion fails with Get-Process on macOS, possibly due to process objects lacking a ProcessName property[/+]SteveL-MSFT commentedon Jun 26, 2018
Michael Klement (@mklement0) thanks to your detailed bug report, I was able to find the root issue and should have a fix soon