procps watch -c/--color option doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
procps (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This is a bug report on 'watch' from procps.
Essentially, it doesn't seem like -c/--color (ANSI color sequences support) works.
Here's how to reproduce:
'man watch says':
-c, --color
This works as expected in bash or dash:
printf "\033[39;
And so is this (additional level of protection from the shell):
printf '"\033[
When running under 'watch', even when the -c/--color is in effect, the colors disappear:
watch -c printf '"\033[
Same issue happens with simpler (one number) ANSI color sequences, e.g.:
printf '"\033[
while:
watch -c printf '"\033[
the color disappears.
The same happens when the whole ANSI escape sequence is hidden
from watch (wrapped in a shell script like this:)
#!/bin/sh
printf "\033[43mWhite-
call this script 'wor', chmod +x wor and try:
watch -c ./wor
Again, color is gone.
I'm using procps_3.3.9 on Ubuntu.
procps 1:3.3.9-1ubuntu2.2
Tried to build from source ('apt-get source procps; cd procps-3.3.9/; make') and the issue is still there.