taskwarrior
taskwarrior copied to clipboard
rc._forcecolor=on does not work with `watch`
Force-enabling the use of colors on the terminal works fine when piping the task output to less -R
like in the following case:
task rc._forcecolor=on | less -R
However, wrapping the same command with watch --color
doesn't enable the coloring of the tasks:
watch --color task rc._forcecolor=on
On the other hand combining ls --color
with watch --color
seems to work fine:
watch --color ls --color
Output of task diag
task 2.6.2
Platform: Linux
Compiler
Version: 9.4.0
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++17
Build Features
Commit: 0a558ef7c
CMake: 3.23.0-rc2
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.6.13
Build type:
Configuration
File: /home/berger/.taskrc (found), 3971 bytes, mode 100664
Data: /home/berger/.task (found), dir, mode 40775
Locking: Enabled
GC: Enabled
$EDITOR: nvim
Server:
CA: not found
Certificate: not found
Key: not found
Trust: strict
Ciphers: NORMAL
Creds:
Hooks
System: Enabled
Location: /home/berger/.task/hooks
(-none-)
Tests
Terminal: 161x41
Dups: Scanned 10481 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 10481 tasks for broken references:
No broken references found
Might be terminal dependent? I can't reproduce this with xfce-terminal
:
For the record, I'm running watch
with version "watch from procps-ng 3.3.17"
I can repro this in gnome-terminal
and kitty
, xfce-terminal
and gnome-terminal
so I'm confident this is an issue with the procps
version. I'm using procps 2:3.3.16-1ubuntu2.3
instead of procps-ng
.
I'm using watch
from procps-2:3.3.17-6ubuntu2
with urxvt and color is working fine with _forcecolor
Have the same problem - task under watch is color-less, instead of other utils.
my env:
- watch from procps-ng 3.3.17
- task version - 2.6.1
- termital:
- gnome-terminal 3.44.0
- kitty 0.21.2
- dist - Ubuntu 22.04.3
thanks to my colleague - we found lost color.
watch strips not-ANSI colors. change taskwarrior color scheme to simple 16-colors returns colors in task-list in watch.
Glad you solved it!