[Bug 246514] w(1) truncates output before passing to libxo

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat May 16 20:26:33 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246514

            Bug ID: 246514
           Summary: w(1) truncates output before passing to libxo
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: ltning-freebsd at anduin.net

When calling w(1) as
 w --libxo=json
or any other output format, values - particularly the WHAT column - gets
truncated by the terminal size at the time of invocation. This is particularly
troublesome when called in a non-terminal session e.g. from cron(8), as it will
then default to 79 characters.

It could be argued that unless the output is a terminal, it should not make any
assumptions about or adaptations to terminal size at all. For example, w|head
should not truncate. However, changing this behaviour might be a violation of
the POLA.

Truncating output prior to passing to libxo shoul, however, probably be
considered a bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list