From owner-freebsd-questions@freebsd.org Sat Apr 6 21:49:05 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E345F156E619 for ; Sat, 6 Apr 2019 21:49:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFB7A6DD9A for ; Sat, 6 Apr 2019 21:49:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.105.233]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1MaIzb-1hQznX1JLR-00WCC5; Sat, 06 Apr 2019 23:48:54 +0200 Date: Sat, 6 Apr 2019 23:48:51 +0200 From: Polytropon To: "@lbutlr" Cc: freebsd-questions@freebsd.org Subject: Re: Column widths FROM / WHAT in w(1) Message-Id: <20190406234851.f2fa5b35.freebsd@edvax.de> In-Reply-To: <82580E12-C2F5-45FB-AAFC-8538B5CE0FCD@kreme.com> References: <20190406153319.36f41b8f.freebsd@edvax.de> <82580E12-C2F5-45FB-AAFC-8538B5CE0FCD@kreme.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PJC4Y+23a8BpK+wHdOYxJu1XBwSQdN/pZ8IfHL24MLe3ejG4H+q bkTPDTyHFmCOoxiNFHqilC7OWxKkisPmakHWdvV16RN/v3vrmGIUsNl3Ti+5htGG7XjKtM8 UZ4UjAxwnK4oGUgXSHZJLGqAB7bayzIxaG4VRekN/dQpytDOvVYMPbXHVFkadyC2fuOwizO 8r2590bpBqVU2ZUiSn+Ww== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ThOlrORocW0=:3T/TaS8+NYY2enjCW684j+ yb1F1sBv35QDCGJkpARjwPdK7hq578/MoIv2O+HEXSaXGYUFHL8boxFqsSwzTS/zGFBD6i16a 5xSBMqjFbRWfiNj9hM+U9oi7A30YwvbcIZ2+fWY1TNdUPIK0aNNBFg8X+ThnuwwcE+Izrmytt +z+qFv9hhbr+0/NXKwO6eZAsVrDb/Ktqyk1I6mpTh83BgdDiuQdbXXuIpo9Tow3YNcsCFcwas MsMY8nQahxJsqpEE07UwZ6MZBShHk/MXVK5yoFBGckTJOBQPuVn0bE4p6rH0YOHjnM3N1NHEd Tmu4oDz4xfrPlGcJG+zn96/L//+Nybpjv/P1SZ1luVavhvBQse7jpqokA4Clh5BZn86Y7QUbf WPeXLVowgx/Ww0aEOdaXKV020eV55bhg3mZXxrZ92Zwj97XLvFwrkNJkv3p/js/nxPnkyfaQG XEpmlz6NsK7FwnfbT9gaD6XVJsb3r5NCMFgThjWYyV/KbOhgPXa39XO0atgNYVthx+zFQBwid tXKA1NWFYD/EohfN1lYjunWbyiJoFo694cVlwLYcE2B0aWi+yzMkF30JldfrpPhLfTrLbvaMV GKr5Fz6xl5gxle+OJ6vGU0UZTgrfE9MWaAKNFO1mQTo8wP70cukS97KCTG5SdmQtfwqACokLP fFKuwMCFXrhBz3TEq/wEyPvqBaG1uAdeOHvX2UBzzjIraN3c6w5xtTTDcGOF/aiOkE40Wv4or D9oI2Oq2TpsE9hj8PaJAikY4KkmUr+3wqRgm5qGpWk8D+PT8SJG0TH1IJ3w= X-Rspamd-Queue-Id: CFB7A6DD9A X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.86 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx00.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[233.105.195.92.zen.spamhaus.org : 127.0.0.10]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.56)[0.561,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.91)[0.907,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.89)[0.886,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[24.17.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.12)[ip: (0.40), ipnet: 212.227.0.0/16(-1.34), asn: 8560(1.54), country: DE(-0.01)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2019 21:49:05 -0000 On Sat, 6 Apr 2019 14:58:23 -0600, @lbutlr wrote: > On 6 Apr 2019, at 07:33, Polytropon wrote: > > > > System: FreeBSD 12.0-p3 i386. > > > > I recently discovered that the WHAT column in the output > > of the "w" command has become unusable, and "man w" does > > not seem to indicate any user control for the formatting > > of the columns. > > > > The column WHAT now can only show up to 3 (in words: three) > > characters on a standard 80-column terminal. I will put a > > How long has it been since an 80 column terminal was standard? That doesn't matter. Terminal width has implications on how you code (yes, really!) and how you process (read) things. For example, why do you think your everyday newspaper has several columns for text instead of having long text spanning the full page width? > > ruler on top for illustration: > > > > ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 > > USER TTY FROM LOGIN@ IDLE WHAT > > > > Things like "xinit" become "xin", and any longer command > > cannot be easily identified anymore. Columns 79 and 80 > > aren't used at all. > > > > For comparison: On an older system, I get this layout: > > > > ....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 > > USER TTY FROM LOGIN@ IDLE WHAT > > > > This is more than 20 characters for the WHAT field. > > Does it depend on the contents of "From"? Hmm, no, it doesn't seem too. Yes, I already checked this. Even with short text entries such as "-" or ":0" the column is that wide. > however, I will say that getting the from field cut-off in > `w` is a lot more of an issue than the WHAT column, I think. There is a preference in seeing all relevant information to a degree where it is understandable (or can be used to decide if more precise information is needed, usually from other programs). That "overview" function of the w command is very useful (or at least, has been, before "xin", "mce", and other abbreviated things... > You could always output as json or xml and do your own thing. Yes, I've seen that in the manual and tried it, but it does not seem to contain the full information either. Example: WHAT xin les /us If processed with "w --libxo json", the following information can be obtained from the "command" field: xin (xinit) les (less) -> filename missing less /COPYRIGHT /us (xzgv) -> full path missing /usr/local/bin/xzgv So the information isn't just displayed incompletely when the terminal width is "insufficient", its export to an external format is also _not_ working (independently). My assumption: Even if it cannot be displayed, it should be exported. But no. With a width of about 150 columns, the information is there: WHAT xinit /home/poly/.xinitrc -- /usr/local/bin/X :0 -auth /home/poly/.serverauth.1132 less /COPYRIGHT /usr/local/bin/xzgv But with such a wide terminal, coding is terrible, and the reduction in font size makes reading even more inconvenient. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...