Repository navigation
ps: keep a column for a field that has no value yet - #824
jayhemnani9910 wants to merge 1 commit into
Conversation
A format field without a picker (stat, nice, pri, wchan, lstart...) printed its header but no value, so every later value moved one column left: ps -l showed the PID under S and the PPID under UID. Print - for such a field, the mark procps uses for a missing value.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #824 +/- ##
==========================================
+ Coverage 19.20% 19.50% +0.30%
==========================================
Files 68 68
Lines 10156 10242 +86
Branches 546 552 +6
==========================================
+ Hits 1950 1998 +48
- Misses 8206 8244 +38
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A format field that ps can't fill yet prints its header but no value, so every value after it moves one column to the left:
The PID shows under
Sand the command underPID.collect_pickersskipped any code without a picker (stat,nice,pri,wchan,lstart,etimes, ...), while the header kept it. Such a field now prints-, which procps-ng also uses for a value it can't show:Filling in those fields is separate work; this only keeps the values under the right headers.
Tests:
test_unimplemented_field_keeps_columns_alignedfails without the change.cargo test: 225 passed (224 on main); clippy clean.