watch: Add no linewrap option

For long lines from a process, watch would wrap them around to the
next. While this default option has it uses, sometimes you want to
just cut those long lines down.

watch has a -w flag which will truncate the lines to the number
of columns. A few simple lines to do this new trick.

I think I caught all the ANSI state correctly but there might be
a chance it bleeds to the next row.

References:
 procps-ng/procps#182
This commit is contained in:
Craig Small committed 2020-10-19 22:07:56 +11:00
1 parent 6a2cc67bb6
commit e36fe38835
3 files changed
+34 -2

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ procps-ng NEXT
* top: fix potential SEGV involving -p switch merge #114
* vmstat: Wide mode gives wider proc columns merge #48
* watch: Add environment variable for interval merge #62
* watch: Add no linewrap option issue #182
procps-ng-3.3.16
----------------