Column Justification Hints
psv can also justify data within a table's columns.
To do this, psv allows the addition of a very limited set of characters to each field of a ruler, indicating how the data in each column should be laid out.
Rulers can also be used to specify the horizontal justification of the text in each column.
When psv reads a table, it will automatically preserve any justification hints and re-use them if needed when re-formatting the table.
psv only puts justification hints in the first ruler under the header row, but it will accept hints from any ruler within a table!
psv will always collect all justifcation hints in the first ruler that appears after the first row of data.
Available Justification Hints
| Pattern | Description | Notes |
|---|---|---|
| : | Justify to the column's left side (default) | only valid when : is the first non-whitespace character in a column |
| -: | Justify to the column's right side | |
| -:- | Justify to the column's center | not available in markdown |
| :-: | Center a column (markdown style) | |
| . | Justify Numerically (on decimal point) | not available in markdown |
| .. | Justify on Major Version Number | not available in markdown |
- the 3-character short-cuts used here can be any length
- try changing the width of the center column, does the position of the : have any effect?
- what happens if you replace the .. hint with just a single .?