Comments (4)
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.
Did you solve this? I'm having this same issue, on ArchLinux.
from color.
@sentientmachin3 Unfortunately no. But it doesn't happen on my Archlinux. I'm using i3wm with xorg.
from color.
@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)
- [bug] yellow color does not take effect in powershell HOT 1
- Allow forcing color output HOT 2
- Package does not build for Go versions between 1.13 and 1.16 HOT 3
- warn users again wrapping fmt.Sprintf()
- Isn't go get deprecated?
- { // Red is the amount of red Red int // Green is the amount of red Green int // Blue is the amount of red Blue int } HOT 1
- In the Windows, press Ctrl+C, the characters in the cmd.exe are displayed in incorrect colors.
- using underline with a different fg color breaks it HOT 3
- Question: is it possible to create a custom color? HOT 6
- Not Downloading HOT 3
- Documentation lies about Println
- downloading HOT 2
- Add arrows and squares with lines HOT 1
- Docker container console support HOT 1
- Set/UnsetWriter asymmetry
- Colorized string doesn't get underlined correctly
- Just a hint: how to make `color` pkg works in `go test` command. HOT 1
- env HOT 1
- CrossedOut not working over SSH
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from color.