Some commands that I use display colors, but when I use them with watch the colors disappears:
watch -n 1 node file.js
Is it possible to have the colors back on somehow?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Some newer versions of
watchnow support color.For example
watch --color ls -ahl --color.Related.
If you’re seeing monochrome output when you expect color, it’s likely that the command you’re running within
watchis detecting that it’s not attached to the terminal and you’ll need to force color output. Some examples:For
lsand other programs you may need to do other configuration, but that will show up even if you’re not usingwatch.