Comments (13)
@gvanem I imagine this'd be an issue for any terminal emulator which either doesn't support or has disabled via config the interpreting of these codes. So the solution you're recommending isn't generic enough and we'll likely get another issue later for a different emulator.
I'll just add a flag & NO_COLOR
env var support as @Calinou mentioned to disable outputting color codes, and you can turn that on.
As a side note:
Could someone in 2021 please detect that such codes are effective before using them?
This attitude is unwarranted. We'll make the change, but you could word it more respectfully.
from cli.
Is this related to the "pretty" format?
@glittle No, but if you use json/csv format then no colors will be displayed.
Just obscure errors like
@gvanem Nothing obscure about it. Your golang installation isn't right.
from cli.
@UmanShahzad PR with what exactly? editing the readme to include this?
from cli.
The coloring is handled by fatih/color, so I doubt the CLI developers have any control over this.
All we could do is obey the NO_COLOR
environment variable and disable colors if it's set to 1. Alternatively, a --no-color
option could be added as follows: https://github.com/fatih/color#disableenable-color
Mine does, but I've turned that off for various reasons.
Could you explain why? I don't remember ANSI codes breaking anything on Windows 10. Windows versions below 10 don't support ANSI codes though.
from cli.
Could you explain why?
Since I use 4NT as my shell (since 20 years ago). Microsloth's cmd
is just crap.
from cli.
Is this related to the "pretty" format?
Apparently that is on by default, and can be turned on with -p
Is there a way to turn it off?
from cli.
On a fresh install of Windows 10, I see the ANSI codes.
from cli.
On a fresh install of Windows 10, I see the ANSI codes.
Since the VT-emulation is default. But like I wrote, those new VT-console functions messes up my shell big time.
But I tried to modify vendor\github.com\mattn\go-colorable\colorable_windows.go
to disable this non-sense.
But rebuilding ipinfo.exe
fails; none of the steps in README.md
works. Just obscure errors like:
build github.com/ipinfo/cli/ipinfo: cannot load io/fs: malformed module path "io/fs": missing dot in first path element
.
from cli.
Added support for the --nocolor
flag and the NO_COLOR
environment variable in https://github.com/ipinfo/cli/releases/tag/ipinfo-1.1.1
Let me know if there's still any issues.
from cli.
You can see this comment on stackoverflow to enable ANSI escape sequences in the windows command prompt, I tried this myself and it works. I think this should be in the readme
Edit: you can also do that with this command:
REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1
from cli.
@wasi-master Interesting, can you make a PR?
from cli.
@wasi-master Yes, if you want.
from cli.
I think I'll just wait until #24 is merged
Edit: did it anyways
from cli.
Related Issues (20)
- Country flag emoji oddly displayed HOT 10
- Implement netIP functionalities in CLI HOT 1
- Bug in `ipinfo tool upper` HOT 1
- Windows 11 (Defender): Trojan:Win32/Bearfoos.B!ml Trojan Virus HOT 3
- Piping a list of IP addresses to map and summarize is NOT working HOT 1
- More basic IP tools
- "ipinfo tool aggregate" weirdness HOT 3
- Linux aarch64 not supported HOT 3
- API endpoint for usage HOT 3
- Tool → aggregate function throwing error at file input HOT 1
- Tool → `aggregate` function does not print IPs as is HOT 5
- IPinfo CLI tool command → `aggregate` closer inspection of operation recommended HOT 1
- Even with installation failure the CLI indicates success HOT 1
- Different GLIBC version in 3.3.0? HOT 3
- How it the CLI handles manual input of tokens?
- ipinfo no longer works on Windows 7, Windows Server 2008 HOT 1
- IPinfo CLI Download command: Invalid character 'U' looking for beginning of value
- Windows Defender flagging as Name: Trojan:Win32/Bearfoos.A!ml
- brew install ipinfo-cli
- The aggregate tool does not support IP range aggregation
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 cli.