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
2020-10-19 22:03:44 +11:00
parent d10c8fccc9
commit d748966e39
3 changed files with 34 additions and 2 deletions

1
NEWS
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
----------------