Piping catkin_make stderr to less while preserving color
Hope this isn't too unrelated to ROS, but in an effort to reduce the amount of times I scroll on a terminal while building my ROS project, I'm trying to pipe catkin_make
's stderr
to less
. However I cannot seem to do so without getting rid of the color, which drastically messes up the readability.
This is where I have reached so far:
catkin_make --cmake-args="-DCLICOLOR_FORCE=1" |& less -R
But with no effect.
Is there any way I can pipe the compiler errors from catkinmake to less
, or failing that, is there a way I can nicely display catkinmake errors without having to scroll so much, while still keeping it human readable?
I am running ROS Kinetic on Ubuntu MATE 16.04 64-bit. I'm using tmux on mate-terminal for my programming environment.
Asked by 9a3eedi on 2018-06-25 04:42:26 UTC
Answers
The less
command does not receive the color control chars because it is not a terminal. Not sure if you can pipe output into a text buffer while preserving those.
As a backup solution: Have you tried Catkin Command Line Tools? The build command only prints compiler output if errors occur which I guess is what you're looking for?
Asked by pgorczak on 2018-06-25 09:42:18 UTC
Comments