Menu

#2 Feature-Request: ctrl-backspace for delete word in WSL Ubuntu

1.0
closed
nobody
None
2022-09-09
2022-09-01
C Drake
No

Most of the keys (PgUp, PgDn etc) on Ubuntu in WSL on Windows do not work "out of the box", but, this amazing .bashrc fixes all those !!!!

The only key I notice that's not totally perfect, is ctrl-backspace. In powershell, DOS, and linux via ssh ctrl-backspace (which I think linux "sees" as chr(127) via ssh using us.map.gz) deletes the word left of the cursor.

Can this .bashrc fix that too ?

Discussion

  • Jeffguy

    Jeffguy - 2022-09-09

    nfortunately, this bug is not limited to WSL.

    If you run this command:

    stty werase ^H

    It will return the CRTL-Backspace functionality to erase a word. Unfortunately, CTRL-H (being used to show help) and CTRL-Backspace share the same key binding.

    I have added a new setting _SKIP_HELP_KEYBIND which will also restore the original functionality and skip mapping these keys. The hlp command will still show the help screen.

    You can also try using ALT-Backspace to delete previous words.

    Thanks for your input!

     
  • Jeffguy

    Jeffguy - 2022-09-09
    • status: open --> closed
     

Log in to post a comment.