taskwarrior
taskwarrior copied to clipboard
[TW-1911] column width
Eric Hymowitz on 2017-05-11T14:46:41Z says:
I don't know if this is a bug or a change.
My .taskrc
has this defined:
{code} report.next.columns=id,tags,due,due.remaining,description,urgency report.next.labels=ID,Tags,Due, ,Description,U {code}
The field "due.remaining" has a label of one space.
In taskwarrior 2.5.1, I get this result: {code} ID Tags Due Description U 10 home 2017-05-02 20:00 frontline cats 18 12 home 2017-05-15 16:00 4d monthly bills 8.7 2016-12-11 include wells fargo, lowes 2017-02-17 include lowes, payoff may {code}
and the "due.remaining" column is 2 characters wide, matching the max width.
In taskwarrior 2.6.0, I get this result {code} ID Tags Due Description U 10 home 2017-05-02 20:00 frontline cats 18 12 home 2017-05-15 16:00 4d monthly bills 8.7 2016-12-11 include wells fargo, lowes 2017-02-17 include lowes, payoff may {code} and the due.remaining field is 4 characters wide -- wider than necessary.
Not a huge problem, but it changes some of the other column widths, and it bothers me aesthetically.
Migrated metadata:
Created: 2017-05-11T14:46:41Z
Modified: 2017-05-11T19:56:12Z
Paul Beckingham on 2017-05-11T19:56:12Z says:
2.6.0 is not released, and there will be a beta period where bugs are accepted. Meanwhile patches welcomed.
I am having the same problem in 2.5.2 (which is also not released yet). I get a four-char-wide due.remaining
column. and I can't see any obvious reason why the column needs to be 4 chars wide.
$ src/task
[src/task next]
ID Tags Due Description U
-- ---------- ---------------- ---- --------------------------------------- ----
14 remind sdo 2018-05-16 12:00 1d Root Password Changes 9.29
15 remind sdo 2018-05-17 09:00 1d Linux patches 8.89
16 remind sdo 2018-05-17 09:00 1d Windows patches 8.89
3 gcom can i tell when a membership expires in 2.8
the store?
4 gcom svn server on my home machine that jeff 2.8
can get to
Hey @hymie0,
I've looked into the code and it looks like the date periods are padded so that the durations align at the boundary between the number and the date period text. (At least that's what I understand commit 1e6b30bbc9d91d1e08b6c97672fab4b935524751 was for.) There can be durations expressed in minutes (min
) or months (mo
), so all date period text is right-padded to 3 characters in total.
ID Age Tag Due Description Urg
14 38min tag 25min Due Alpha 9.59
15 38min tag 19h Due Beta 9.23
16 38min tag 7mo Due Gamma 3.2
3 tasks
I wouldn't really count this as a bug, but it could perhaps be configurable if the durations should be padded or not. Alternatively, it could be done so that the strings are padded only as much as they need but that probably would be more complicated to code.
Thoughts?