How do I change the definition of a word boundary in Bash?
When I type "ping www.yahoo.com[C-w]", I am left with "ping ". I would like it if I were left with "ping www.yahoo." on pressing C-w. Is there a definition (maybe in the form of a regexp) somewhere in a config file that I can change? Or is there a way to create your own shortcut commands in Bash?
I know I can do that in Vim. Not sure about Bash. No mention in the Bash manual. :-/
Manish
On Tue, 10 Jul 2001, Manish Jethani wrote:
How do I change the definition of a word boundary in Bash?
I would think that setting IFS should work. The default is <space><tab><newline>. It doesn't.
Then I figured that this isn't really the shell's job, but the job of the readline library, so I checked that.
According to that section, word boundaries are composed of alphanumeric characters (letters and digits), but no mention of periods.
Maybe if you fool around a bit with the readline docs, you'll find something.
Philip
Manish Jethani wrote:
How do I change the definition of a word boundary in Bash?
When I type "ping www.yahoo.com[C-w]", I am left with "ping ". I would like it if I were left with "ping www.yahoo." on pressing C-w. Is there a definition (maybe in the form of a regexp) somewhere in a config file that I can change? Or is there a way to create your own shortcut commands in Bash?
press [Alt-Backspace] it deletes one word at a time. so $ ping www.yahoo.com[A - <-] will give you $ ping www.yahoo.
There are a variety of available shortcuts in bash. But i dont know how to create my own :-(
I know I can do that in Vim. Not sure about Bash. No mention in the Bash manual. :-/
Manish
Richard Stallman's Public Lecture 5pm 17th July, at TIFR. Linuxers mailing list Linuxers@mm.ilug-bom.org.in http://mm.ilug-bom.org.in/mailman/listinfo/linuxers
On Tue, 10 Jul 2001, Rakesh Tiwari wrote:
press [Alt-Backspace] it deletes one word at a time. so $ ping www.yahoo.com[A - <-] will give you $ ping www.yahoo.
There are a variety of available shortcuts in bash. But i dont know how to create my own :-(
man bash. There is a section on readline. You have to edit inputrc to create your own shortcuts.
Philip
Sometime today, Rakesh Tiwari wrote:
press [Alt-Backspace] it deletes one word at a time. so $ ping www.yahoo.com[A - <-] will give you $ ping www.yahoo.
Thanks. That solves the problem (at least this case). Anyway, it would be nice to know how to create your own shortcuts. I'll check and get back if I find anything.
BTW that should be expressed as M-Rubout, not A-<-, strictly speaking.
Manish