5 ms·
For tools that don't honor NO_COLOR, I have a filter called nofun, which gets rid of color and animations. https://github.com/alrs/nofun https://github.com/alr
by alrs 5y ago
For tools that don't honor NO_COLOR, I have a filter called nofun, which gets rid of color and animations.
https://github.com/alrs/nofun https://github.com/alrs/nofun
- dijonman2 5y agoYou can also use col -bx
- alrs 5y agoNeat. col -bx leaves more artifacts lying around, but it does get the job done.
- spicybright 5y agoI hope the author of the article sees this, because this is absolutely the best solution to what they want to do. I'm sure you can even do some clever bash-foo to run your term sessions through it, like how screen or tmux work.
- jart 5y agoYou can also pipe it through sed 's/\x1b\[[;0-9]*m//g'
- Qub3d 5y agoAs noted in the repo README: > One could do this with GNU sed, but developers working in proprietary operating systems don't have GNU sed.
- runeks 5y agoDo we even need NO_COLOR if this works as promised? Why prefer NO_COLOR=true command over command | nofun ? The latter seems both cleaner to me and it doesn’t require modification of all existing CLI programs to work.