Skip to content

Fix repeated headers to be bounded properly#12

Merged
neekey merged 1 commit intoneekey:masterfrom
Empact:fix/repeated-header
Jan 15, 2018
Merged

Fix repeated headers to be bounded properly#12
neekey merged 1 commit intoneekey:masterfrom
Empact:fix/repeated-header

Conversation

@Empact
Copy link
Contributor

@Empact Empact commented Dec 26, 2017

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.

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.
@neekey
Copy link
Owner

neekey commented Jan 15, 2018

Looks good! Thanks

@neekey neekey merged commit 4a15bbf into neekey:master Jan 15, 2018
@Empact Empact deleted the fix/repeated-header branch January 19, 2018 00:40
@Empact
Copy link
Contributor Author

Empact commented Mar 5, 2018

@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+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants