Fix tab expansion for Get-Process on macOS - #7176
Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits intoJun 27, 2018
Merged
Fix tab expansion for Get-Process on macOS#7176Aditya Patwardhan (adityapatwardhan) merged 2 commits into
Get-Process on macOS#7176Aditya Patwardhan (adityapatwardhan) merged 2 commits into
Conversation
Steve Lee (SteveL-MSFT)
requested review from
Aditya Patwardhan (adityapatwardhan) and
Andrew (anmenaga)
June 26, 2018 00:30
Steve Lee (SteveL-MSFT)
requested review from
Bruce Payette (BrucePay) and
Dongbo Wang (daxian-dbw)
as code owners
June 26, 2018 00:30
Ilya (iSazonov)
approved these changes
Jun 26, 2018
|
|
||
| if (string.IsNullOrEmpty(listItemText)) | ||
| { | ||
| continue; |
Collaborator
There was a problem hiding this comment.
If we now silently skip empty strings should we document this?
Contributor
There was a problem hiding this comment.
I'm surprised a process might not have a name - is this patching over a problem elsewhere, like in .Net?
At any rate, a comment on why this is expected would be useful.
Member
Author
There was a problem hiding this comment.
Jason Shirk (@lzybkr) if I run PowerShell with sudo, the process names are there. So presumably these are system processes where some properties are protected. I'll add a comment.
Aditya Patwardhan (adityapatwardhan)
approved these changes
Jun 27, 2018
Thatgfsj (Thatgfsj)
pushed a commit
to Thatgfsj-contribs/PowerShell
that referenced
this pull request
Aug 6, 2026
* fix tab exapnsion for get-process on macOS * add comment to address PR feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
macOS has a number of nameless processes. When tab expansion gets called, the empty process names results in an exception which fails the entire completer. Fix is to skip processes with empty name so that the named processes still show up in the result list.
Fix #7174
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests