Fix repeated headers to be bounded properly#12
Merged
neekey merged 1 commit intoneekey:masterfrom Jan 15, 2018
Merged
Conversation
Previously, the field lookup occurred from the beginning of the line so would repeated find the same line location if the same string or a substring of a header was searched more than once. Instead track the current end index of the previous field to base the search state location on.
Owner
|
Looks good! Thanks |
Contributor
Author
|
@neekey once you make a release, I'll update neekey/ps#69 to reference it |
Empact
added a commit
to Empact/ps
that referenced
this pull request
Apr 8, 2018
On mac, lx includes: -l Display information associated with the following keywords: uid, pid, ppid, flags, cpu, pri, nice, vsz=SZ, rss, wchan, state=S, paddr=ADDR, tty, time, and command=CMD. On mac, the ps output can be misaligned, e.g. when some VSZ field is longer than expected. VSZ and many others of these fields are unnecessary because we're looking up by name, pid, ppid, or arguments only. Here I select those directly. This requires neekey/table-parser#12 which was released in table-parser 1.0.0+
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.
Previously, the field lookup occurred from the beginning of the line
so would repeated find the same line location if the same string or a substring
of a header was searched more than once.
Instead track the current end index of the previous field to base the search
state location on.