Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Windows Console question here! :)

Are there any plans to support GNU Readline shortcuts such as history searching with Ctrl-R directly in the Windows Console?

I'm mostly using WSL to run the PostgreSQL CLI with the standard keyboard behavior. It would be nice to be able to do that without having to install WSL.



If you run PowerShell, then PSReadline will give you a similar editing experience in PowerShell. I believe that PSReadline is built into the PowerShell that's part of Windows 10.


In the meantime, clink (https://github.com/mridgers/clink) works well. It stays out of your way, and isn't clunky like the full shell replacements. I had even forgotten that cmd.exe doesn't do ctrl-r out of the box.


I would say that's not very high on our backlog. That sounds like something that we'd need to implement directly in cmd.exe (the shell), not conhost.exe (the terminal) and changing cmd's behavior is VERY HARD to do without somehow breaking the world.


Actually, command line editing and history recall for such programs is in the console. That's where the actual mechanism of DOSKEY lives. That's where history recall lives, governed by SetConsoleHistoryInfo().

One can of course write command interpreters that have their own editing systems, rather than use the one provided by the console. JP Software has done this for many years.

* https://jpsoft.com/help/index.htm?cmdhist.htm

But tofflos is asking about improving the one that is in the console.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: