Bash fails to pass control characters to cmd.exe #57

Open
opened 2026-01-30 21:40:56 +00:00 by claunia · 0 comments
Owner

Originally created by @skylize on GitHub (Jan 30, 2018).

Windows build number

10.0.17074.1002

What you're doing and what's happening

In Windows WSL Bash Terminal

  1. Open cmd inside the Bash terminal and type any command.
sky@SkyZen:~$ cmd.exe
Microsoft Windows [Version 10.0.17074.1002]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>echo hello
echo hello
hello
  1. Press .

What's wrong / what should be happening instead

Actual behavior: A textual representation of the Up Arrow control key gets typed into the input field.

C:\WINDOWS\system32>^[[A

Expected behavior: Pressing will show the previous command in the input field.

C:\WINDOWS\system32>echo hello
Originally created by @skylize on GitHub (Jan 30, 2018). ### Windows build number 10.0.17074.1002 ### What you're doing and what's happening In Windows WSL Bash Terminal 1. Open `cmd` inside the Bash terminal and type any command. ``` sky@SkyZen:~$ cmd.exe Microsoft Windows [Version 10.0.17074.1002] (c) 2017 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>echo hello echo hello hello ``` 2. Press <kbd>&uparrow;</kbd>. ### What's wrong / what should be happening instead ***Actual behavior***: A textual representation of the Up Arrow control key gets typed into the input field. ``` C:\WINDOWS\system32>^[[A ``` ***Expected behavior***: Pressing <kbd>&uparrow;</kbd> will show the previous command in the input field. ``` C:\WINDOWS\system32>echo hello ```
claunia added the Product-ConhostProduct-WSL labels 2026-01-30 21:40:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#57