Summary: | sys-apps/openrc output is unfriendly on high resolution/wide monitors | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | Aidan Marks <aidanamarks> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | patrick |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for rc-status
Cleaned up rc-status patch New patch, now detecting terminals properly |
Description
Aidan Marks
2012-11-24 19:46:03 UTC
*** Bug 463962 has been marked as a duplicate of this bug. *** From the dupe'd bug: I suggest an output change similar to the way debian does it: put the [ OK ] / [FAIL] output to the left of the rest so that there is less distance between the status indicator and the service. Current: * Blah starting up < -- 150 characters distance -- > [ OK ] Suggested: [ OK ] * Blah starting up Created attachment 362194 [details, diff]
Patch for rc-status
First draft of a patch, quite ugly but works
Created attachment 362282 [details, diff]
Cleaned up rc-status patch
Now with proper pipe detection
Created attachment 362340 [details, diff]
New patch, now detecting terminals properly
This fixes pipe/terminal detection.
In addition there's a second newline printed for eend to avoid output clobbering (which is not a clean solution, but fixes some output glitches)
Another approach: Limit terminal width to 80 char Not sure if that is what users expect, but it avoids the infinitely wide lines @@ -805,6 +816,9 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg) return; cols = get_term_columns(fp) - (strlen(msg) + 5); + /* limit output width */ + if (cols > 80) + cols = 80; /* cons25 is special - we need to remove one char, otherwise things * do not align properly at all. */ |