Code Monkey home page Code Monkey logo

Comments (4)

Karmenzind avatar Karmenzind commented on September 27, 2024 1

Thanks a lot! I tried less -RF on Ubuntu 20 and it fixed the color. I'll do more test on other distros.
@tararoshan

from color.

sentientmachin3 avatar sentientmachin3 commented on September 27, 2024

Did you solve this? I'm having this same issue, on ArchLinux.

from color.

Karmenzind avatar Karmenzind commented on September 27, 2024

@sentientmachin3 Unfortunately no. But it doesn't happen on my Archlinux. I'm using i3wm with xorg.

from color.

tararoshan avatar tararoshan commented on September 27, 2024

@sentientmachin3 @Karmenzind I had this same issue on Mac as well. If you're using less or more (which it seems like you are), run this with the -R command. That is, change var pager = exec.Command("less", "-F") to

var pager = exec.Command("less", "-RF")

From the man pages for less,

       -R or --RAW-CONTROL-CHARS
              Like -r, but only ANSI "color" escape sequences and OSC 8
              hyperlink sequences are output in "raw" form.  Unlike -r, the
              screen appearance is maintained correctly, provided that there
              are no escape sequences in the file other than these types of
              escape sequences.  Color escape sequences are only supported
              when the color is changed within one line, not across lines.  In
              other words, the beginning of each line is assumed to be normal
              (non-colored), regardless of any escape sequences in previous
              lines.  For the purpose of keeping track of screen appearance,
              these escape sequences are assumed to not move the cursor.

Found this out while looking at #157. Hope this helps! :)

from color.

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.