4

as the title says, I want to see colors in my watch command.

ex:

# enable colors when running javascript unittests with watch
watch mocha 

# enable colors when doing `ls`
watch ls -aG

1 Answer 1

1

Some programs, such as ls try to be "smart" and only use color when connected to a terminal. Hopefully they have a way to force color. ls does.

watch --color ls -aG --color

Edit: Only tested with Ubuntu Raring.

1
  • I doesn't work on macOS.
    – piecioshka
    Mar 17, 2020 at 12:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .