Open vrachnis opened 8 months ago
Thanks, I personally prefer the space instead of the extra characters for the first two columns. Now, does this support printing the published ports corresponding to each IP? does this support different hostname per IP?
Regards
When a VNET jail has more than IP address configured on its primary interface, invoking
bastille list -a
will now display all addresses vertically aligned. This is to address a misalignment issue where the fields following the ip addresses were no longer in the same line as the jail name.For instance:
With this change, all additional IPs for a given jail are aligned vertically, and the fields following the IP (ports, hostname, release, path) are all in the same line as the jail name:
Considerations
Grouping of IPs
Initially I attempted to use line-drawing characters to visualize the fact that all addresses belong to the same jail:
While the result was making it clear to the user where the extra line comes from, the implementation became unnecessarily complex. More importantly, it meant that if anyone parses the output of
bastille list -a
in their script, would have to account for the fact that the "primary" IP address would be in either the third or fourth field of the line.This highlights the fact that with this, the first and second/third/etc addresses will still be on different fields. The first address will be on field number 3, while the following addresses will be on field number 1. I could potentially modify the output to put some dummy characters in the first two columns, although I'm not sure that I like the result. Let me know if something like the following is preferable.
Dependencies
No new dependencies were introduced.