Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • do you know how to modify ~/.inputrc, so that Alt-D will use white space as a word boundary? Commented Aug 17, 2014 at 10:54
  • @MartinVegter I don't think you can do it with readline alone, but you can do it in bash, see my edit. If you want fancy command line edition, you'll be better off in zsh. Commented Aug 17, 2014 at 12:58
  • after having used your hack for some time now, I find it absolutely great. There is only one small problem: When I press M-d to delete a whitespace-delimited word, it deletes the word including the whitespace after it. I have to manually add the space, otherwise the two commands will be joined together. Would there be any way of changing that in the code? Commented Oct 14, 2014 at 21:35
  • @MartinVegter This makes sense. My code was actually deleting the first space character after the word, which was just weird. I've changed my approach in delete_whitespace_word, it should now work like in Emacs and like you want. Commented Oct 14, 2014 at 21:57
  • sorry, my mistake. Actually it works perfectly. Commented Oct 14, 2014 at 22:48