OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

cmd.exe command line history doesn't work #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start the Cygwin cmd.exe program giving access to the Windows shell.
2. Attempt to browse the command history using the up/down keys.
3.

What is the expected output? 
The previous commands used in the Windows shell.

What do you see instead?
A cursor moves about the screen.

What versions of mintty, Cygwin/MSYS, and Windows are you using?
CYGWIN_NT-6.1-WOW64 [...] 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin

Original issue reported on code.google.com by patchest...@gmail.com on 15 Nov 2010 at 9:46

GoogleCodeExporter commented 9 years ago
Unlike with Unix shells like bash that implement the command line history 
themselves, cmd.exe relies on the console window to do it. Mintty, being a Unix 
terminal, does not implement it, and I don't think there'd be a way to decide 
when to process arrow keys itself and when to send it to the pty driver and 
application. What there is in terms of command line editing (mostly just 
backspace) is implemented by Cygwin's pty driver, so theoretically more could 
be done there, but I don't think there's any precedence for that. You can get 
cmd.exe to work reasonably well in mintty by running it through conin.exe from 
the issue 56 thread, or through rlwrap. Bottom line is though: cmd.exe is 
happiest in a console window.

Original comment by andy.koppe on 16 Nov 2010 at 6:18

GoogleCodeExporter commented 9 years ago
ps: A quick way to invoke cmd.exe in a console from bash is "cygstart `which 
cmd`". Obviously that can be shortened further with an alias or shell function.

Original comment by andy.koppe on 16 Nov 2010 at 7:42