column: add --wrap-separator option for custom text wrapping
Add a new --wrap-separator option that allows users to specify custom
separator characters for text wrapping within table columns. When used
with --table-wrap, the separator is replaced with newlines to enable
wrapping at specific points rather than just by column width.
The implementation:
- Processes wrap separator replacement in modify_table() after column
wrap flags are set
- Uses scols_cell_refer_memory() for data containing embedded nulls
- Enables scols_wrapzero_nextchunk for columns with wrapping enabled
- Only applies to columns that have the wrap flag set via --table-wrap
Example usage:
$ echo -e 'Name:Desc\nJohn:A|software|dev' | \
column --table --separator ':' \
--table-wrap 2 --wrap-separator '|'
Name Desc
John A
software
dev
Fixes: https://github.com/util-linux/util-linux/issues/3739 Signed-off-by: Karel Zak <kzak@redhat.com>