On a Friday in 2026, Peter Krempa via Devel wrote:
From: Peter Krempa <pkrempa@redhat.com>
In certain cases the code might want to skip the forced spacing.
Introduce a concept of flags for each column and new function 'vshTableRowAppendFlags' which will do similar job as 'vshTableRowAppend' but add tuples of flags and the string itself.
This patch implements the following flags:
VSH_TABLE_CELL_SKIP_LEADING - skips the single leading whitespace VSH_TABLE_CELL_SKIP_TRAILING - skips the trailing 2 whitespaces VSH_TABLE_CELL_ALIGN_RIGHT - moves the alignment to the right of the column
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tools/vsh-table.c | 75 ++++++++++++++++++++++++++++++++++++++++++++--- tools/vsh-table.h | 14 +++++++++ 2 files changed, 85 insertions(+), 4 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano