]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
w: don't truncate if we're writing libxo json/xml
authorKristof Provost <kp@FreeBSD.org>
Fri, 7 Oct 2022 16:14:02 +0000 (18:14 +0200)
committerKristof Provost <kp@FreeBSD.org>
Fri, 7 Oct 2022 16:21:27 +0000 (18:21 +0200)
commit307625842b02ee4c898751dbeaa16eb370bbb7f7
tree1bfaf5e166231daab1425803008ede23efac7944
parent947fcb84b77a3dac9625380078f6cdcbcccd8b7d
w: don't truncate if we're writing libxo json/xml

If we're writing structured output (i.e. json or xml) we shouldn't worry
about terminal width, and instead always output full width information.

This means that, for example, if we're called from crontab with 'w
--libxo json' we'll provide full the command field rather than
pointlessly truncating it.

Suggested by: Phil Shafer
Event: Aberdeen Hackathon 2022
Differential Revision: https://reviews.freebsd.org/D25013
usr.bin/w/w.c