Ansi codes are not properly handled on Windows Terminal
See original GitHub issue- [x ] I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v
flag before pasting the output.
Steps to reproduce
run git bash in Windows Terminal
run pdm -h
Actual behavior
Terminal codes are output raw.
PDM - Python Development Master
←[33m←[1mCommands←[0m:
←[36m {add,build,cache,completion,config,export,import,info,init,install,list,lock,plugin,remove,run,search,show,sync,update,use}
←[0m←[36m add ←[0mAdd package(s) to pyproject.toml and install them
←[36m build ←[0mBuild artifacts for distribution
←[36m cache ←[0mControl the caches of PDM
←[36m completion ←[0mGenerate completion scripts for the given shell
Expected behavior
I expected output to be formatted and colored like it is in other environments.
Environment Information
# Paste the output of `pdm info && pdm info --env` below:
$ pdm info && pdm info --env
PDM version: 1.13.3
Python Interpreter: C:\Users\julie\AppData\Local\Programs\Python\Python310\python.EXE (3.10)
Project Root: C:/tmp/a
Project Packages: C:\tmp\a\__pypackages__\3.10
{
"implementation_name": "cpython",
"implementation_version": "3.10.2",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_release": "10",
"platform_system": "Windows",
"platform_version": "10.0.19043",
"python_full_version": "3.10.2",
"platform_python_implementation": "CPython",
"python_version": "3.10",
"sys_platform": "win32"
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Windows console with ANSI colors handling - Super User
I'm the author of this console emulator. Ansi sequences are handled for all processes, running in ConEmu tabs. AFAIK, ConEmu supports more codes,...
Read more >ANSI escape code not working properly [C++] - Stack Overflow
3. Possible answer on sister site: Windows console with ANSI colors handling (not 100% sure if this applies to powershell as well, or...
Read more >Inconsistent ANSI escape code handling on Windows 10
The correct handling of ANSI escape codes by the print() function may or may not be enabled in the Windows 10 command prompt...
Read more >using ANSI escape codes on Windows, macOS and Linux ...
How to use ANSI escape codes with the C programming languages on Windows, macOS and Linux terminals.
Read more >Don't Trust This Title: Abusing Terminal Emulators with ANSI ...
An ANSI escape characters injection vulnerability in OpenShift and ... Learning from the Past: Code Execution by Modifying the Windows Title.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Getting this right always seemed way too complicated to me! Now it seems less complicated, thanks to your thorough explanation, so thanks a lot for sharing 🙂
Still facing this issue in 2.1.2!