ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Piping catkin_make stderr to less while preserving color

asked 2018-06-25 04:42:26 -0600

9a3eedi gravatar image

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 catkin_make to less , or failing that, is there a way I can nicely display catkin_make 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-25 09:42:18 -0600

pgorczak gravatar image

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?

edit flag offensive delete link more

Question Tools



Asked: 2018-06-25 04:42:26 -0600

Seen: 169 times

Last updated: Jun 25 '18