Closed nevinera closed 11 months ago
Perhaps we should just go unix here, and support a tab-separated output (not true tsv), specifically intended to be fed into column -s $'\t' -t
? Wish there were a simpler command to use, but column -t
by default splits on whitespace, which is not ideal.
Actually, this isn't going to help - the shapes are too varied. Instead, let's take a cue from git, and support a formatting string. Alongside '-n', let's take --message-format="%ABCDNAME%A.BNAME"
, where each sigil takes two values and a string.
l
, r
, indicating justification - will it be left- or right-justified? (If it's shorter than the column width, will it be padded on the right or the left?)b
, e
, or m
("beginning", "end", or "middle"), indicating that the last, first, or middle section of the value will be truncated if necessary.For example --message-format="%lbred40tool %lmcyan20rule"
Right now, the message output from
normal
logging mode is completely ragged, which makes it hard to read.The file-paths could be quite long, but are at least likely not to vary a great deal; the tool names are uniformly short. But the rule-names could vary substantially - I'd suggest giving them a maximum column width, and letting them overflow past it, such that rows with really long rule names just bust their column and start their message-body in the wrong place. Probably 60 characters is a reasonable limit?