varlinkctl: respect $COLUMNS when rebreaking lines and we are not connected to a TTY
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Oct 2024 09:10:35 +0000 (11:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Oct 2024 13:47:25 +0000 (15:47 +0200)
commite8139b15e151b9503dc7beb61a9c566967b6aba7
tree7587c27c9f8b677e0272e7fe756bffdcb3f76c0b
parent6eabea49dad9ae51a7915d96f4d0155ce37a77c8
varlinkctl: respect $COLUMNS when rebreaking lines and we are not connected to a TTY

Let's provide a mechanism to select the number of screen columns for
rebreaking comments in Varlink IDL connected to a TTY, by honouring the
$COLUMNS env var then too. Previously we'd only honour when connected to
a TTY, but it's also useful otherwise for rebreaking ridiculously long
comments, hence honour it in this case too.
src/basic/terminal-util.c
src/basic/terminal-util.h
src/varlinkctl/varlinkctl.c