2

I recently started using the fish shell for some things and generally like it. However I've run across one situation that would be great if there were a workaround. Say I typed a command like this:

curl http://169.254.169.254/latest/meta-data/local-hostname

(bonus points if you recognize where that's from :) )

In typical *nix shells like bash, if I hit Esc then Backspace, it will erase back to the previous non-alphanumeric character (in this case the hyphen after "local") so you can basically go a "word at a time" deleting commands.

In fish shell, hitting Escape before Backspace does nothing special compared to just hitting Backspace (erases the previous single character only). Is there a way to do "by-word backspacing" in fish shell?

2 Answers 2

2

According to my reading of the fine manual, it looks like Ctrl-W might do what you want.

1
  • 1
    Hey look, that works! Thanks for the link (and the nice way of saying "RTFM"!)
    – Devin
    Commented Jun 9, 2015 at 19:36
0

They're slightly different. esc-backspace deletes an element, but ctrl-w deletes to the previous whitespace (or space character).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .