cmder: Cannot use Ctrl+Backspace to delete a word in Bash on Ubuntu on Windows
I’ve recently added Bash on Ubuntu on Windows as a task for Cmder:
%windir%\system32\bash.exe ~ -cur_console:p
Everything works fine except for the fact, that pressing Ctrl+Backspace results in a small lag in the console and nothing being deleted, whereas in other consoles (regular cmdPowershell or bash, all ran under Cmder) it works fine and deletes the last word behind the cursor.
Is there an option to enable Ctrl+Backspace for Bash on Ubuntu on Windows? I’d be satisfied with this command just removing a single character instead of lagging the window.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 18 (2 by maintainers)
FYI a terrible hack that works is remap Ctrl+Backspace to Alt+Backspace. Still this should be fixed, but in the meantime if your fingers really hate that Alt+Backspace thing (which doesn’t exist on the standard cmd or any shell) you can go this way.
i found that alt+backspace starts working instead
EDIT 2019-08-02 This solution no longer appears to work (as icharge points out from their reply) marklauyq’s “terrible hack” works great! I did have to disable the Read line enhancements Ctrl+Backspace option that didn’t work anyway to avoid the annoying popups that there was a duplicate key mapping.
I have found that leaving the cmder defaults - I will open to cmd.exe {cmd::Cmder}. After initialization, I am unable to use CTRL+Backspace. It is annoying, but using ALT+Backspace does the trick. I stumbled on a work-around tonight - if you type
cmd
and then immediatelyexit
CTRL+Backspace functionality works.Why was this closed? It’s still broken…
I’ve noticed if you turn this setting off
It seems to fix the problem, for bash, at least.
Works like a charm