Giter Club home page Giter Club logo

Comments (5)

kilianc avatar kilianc commented on August 30, 2024

@baptistemarchand thanks for contributing.

ANSI parsing apparently is very hard. I spent quite some time looking for the "right" lib without luck. As you can see the color is parsed ~correctly, it may be a problem with [K. I will google it up but it's ansi_up issue. I am open to suggestions on alternative libs.

8rdw6zhuc19ae4ydvwpcragx65kzg4q-8ierchasaxy

from rtail.

kilianc avatar kilianc commented on August 30, 2024

try this:

$ echo -e "\e[01;31mlol\e[m aaa" | rtail --name test_grep

the problem appears to be grep adding a clearline escape.

ref: http://unix.stackexchange.com/questions/45190/grep-color-adds-ansi-code-esck-this-can-change-displayed-text

from rtail.

kilianc avatar kilianc commented on August 30, 2024
$ GREP_COLORS=ne echo lol aaa | grep --color=always lol | rtail --id test_grep

did we do it? 💃

from rtail.

baptistemarchand avatar baptistemarchand commented on August 30, 2024

Thanks for your quick answer!
I tried the GREP_COLORS solution yesterday and couldn't get it to work. After some investigation today it appears that BSD grep (the version used on mac) doesn't support the GREP_COLORS variable. I tried it on Linux and it works fine with GNU grep.
This is getting really outside the scope of rtail so you can probably close this issue. I'll let you know if I find an elegant workaround for OSX!
It might be useful to document the GREP_COLORS=ne thing somewhere, like in the README or some FAQ.
Thanks!

from rtail.

kilianc avatar kilianc commented on August 30, 2024

@baptistemarchand thanks for contributing.

from rtail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.