In bash emacs mode, is there anyway to delete till the previous slash character?
For example if i entered the command cp /usr/local/bin/reallylongincorrectfolder /home/myname/reallylong_and_correct_path
and want to just delete the reallylongincorrectfolder
.Is there any shortcut? This is a very comman scenario for me in bash.
Something like dF<char>
in vi?
Linux – Bash readline deleting till the previous slash
bashlinuxreadline
Best Answer
To test out the keybinding with eg. Ctrl-b:
For permanent usage, add it to
~/.inputrc