Escape character garbage on command line (Win81)
See original GitHub issueI’ve been using PWSH 6.1.1 since introduced and that shell has been working great, mostly.
Decided to give the 7.0.0-rc.2
a run…
- Good News: start up is 25% faster
- Bad news: Lots of escape character garbage on command line, appearing as soon as you type anything. (In particular the
[104m
.)
Steps to reproduce
# type a "$" (the first one is part of the prompt)
$ $⬜[104m
(I had to manually paste a box character above, since it didn’t show in the github markup.)
----------------------------------------------------------
PowerShell Version : 7.0.0-rc.2
OS Name : Microsoft Windows 8.1 (64-bit)
OS Version : 6.3.9600 [2014-08-16 00:50:01]
OS BuildLabEx : 9600.19538
OS HAL : 6.3.9600.18969
OS Kernel : 6.3.9600.18217
OS UBR : 19599
-------------------------------------------------------
on Host : xxxx
as User : xxxx
with Privilege : Administrator
-------------------------------------------------------
ExecutionPolicy :
MachinePolicy : Undefined
UserPolicy : Undefined
Process : Undefined
CurrentUser : Bypass
LocalMachine : RemoteSigned
Console Settings:
Type : ConsoleHost
OutputEncoding : Unicode (UTF-8)
Color Capability : 151
Registry VT Level : 1
CodePage (input) : 437
CodePage (output) : 437
Mode (input) : 0x1f7
Mode (output) :
Name Value
---- -----
PSVersion 7.0.0-rc.2
PSEdition Core
GitCommitId 7.0.0-rc.2
OS Microsoft Windows 6.3.9600
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Related issue with further descriptions:
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (5 by maintainers)
Top Results From Across the Web
Escape character garbage on command line (Win81) #11685
I've been using PWSH 6.1.1 since introduced and that shell has been working great, mostly. Decided to give the 7.0.0-rc.2 a run.
Read more >Escape sequences unprocessed under the "cygwin" terminal
1 Answer. In order for an application to be able to use ANSI escape sequences when launched from cmd.exe ( TERM=cygwin ), either...
Read more >Windows 10 show garbage characters
Open Control Panel and go to Appearance and Personalization. Appearance. Now under Fonts select Change Font Settings. Fonts. In the new window ......
Read more >Help for all Microsoft Windows 8.1 Pro commands
GRAFTABL, Enables Windows to display an extended character set in graphics mode. ... To include special characters in the command line, ...
Read more >Weird garbage (ansi escape characters?) in terminal when ...
I have a script, that when run sometimes/often outputs an "unescaped" ANSI escape sequence when encountering this line:
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
I think you should be able to remove it by:
pwsh -nonprofile -noninteractive
from CMD.exeRemove-Module -FullyQualifiedName @{ ModuleName = "PSReadLine"; ModuleVersion = "2.1" }
PSReadLine is loaded at powershell startup. Once the assembly is loaded, the assembly file on disk cannot be removed. Maybe that’s why you couldn’t uninstall it.
-noprofile -noninteractive
basically tells powershell to start without loading PSReadLine.Sure, you will find the “Upgrading” section helpful: https://github.com/PowerShell/PSReadLine#upgrading You probably should avoid the 2.1.0-beta1 version of it, because it contains an experimental feature “Predictive Suggestion” that doesn’t work well on downlevel Windows like Win 8.1. But knowing the upgrading instructions will help you get to latest PSReadLine in future.