This is certainly not a major bug in Dirvish, but it's somewhat... you 
know :-)

When Dirvish makes a report and sends it via mail to me, the columns 
aren't straight, i. e. the number of whitespaces in the head of the 
"table" doesn't correspond to the number of signs produced in the lines 
underneath. Of course, I watch it with a non-proportional font. Here's 
an example (hope you can see what I mean even in mail):

Expiring images as of 2010-09-28 21:00:01

VAULT:BRANCH    IMAGE           CREATED           EXPIRED
backup-home:default 20100913-2130   2010-09-13 22:07  +6 days == 
2010-09-19 21:30
backup-klein:default 20100913-2218   2010-09-13 22:18  +6 days == 
2010-09-19 22:18
backup-opt:default 20100913-2218   2010-09-13 22:19  +6 days == 
2010-09-19 22:18
backup-root:default 20100913-2219   2010-09-13 22:20  +6 days == 
2010-09-19 22:19
backup-usr:default 20100913-2220   2010-09-13 22:22  +6 days == 
2010-09-19 22:20


I know: This sounds like an easy thing to fix, but IF Dirvish writes 
these lines on-the-fly while doing backup, you won't be able to forecast 
how long the next line will become - or will you? At least one could 
consider the length of the longest name in the vault:branch column, the 
rest seems to stay pretty much the same over the whole table.

Unfortunately, my own knowledge of Perl tends against zero :-) So what 
I'd try out first is

- a loop finding out the longest string for VAULT:BRANCH and store this 
value
- build the header according to this value plus the necessary number of 
whitespaces between the rest of the column headers
- adding the rest of the lines when they appear, but again considering 
this value plus the necessary spaces to match the header line

What do you think?

Regards

Rolf
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish

Reply via email to