5 ms·
What does this give you over the default Ctrl-r?
by mdpye 14y ago
What does this give you over the default Ctrl-r?
- csmatt 14y agomy thoughts exactly
- dima55 14y agoCtrl-R finds commands that contain the string anywhere. The method the OP posted finds commands that begin with the string. This is an important difference, and if you give it a try, you'll likely agree the latter is what you want most of the time.
- csmatt 14y agoah ok. Thanks for the clarification :)
- EzGraphs 14y agoThanks for the clarification - although depending upon how you work, this is not much of a benefit. For instance - if you type "/path/to/script.sh" you want to search for the name of the script - not the beginning of the path.
- mh- 14y agoC-r in zsh takes regexp patterns (so you could do *^substr to match begins-only).. I hadn't noticed this wasn't the behavior in bash with readline. Anyone know if that can be done in bash/readline?
- mh- 14y agowhoops, errant asterisk that I can't edit out. unclosed attempt-to-italicize
- qu4z-2 14y agoIn my workflow, I almost always want substring match as that allows me to input either the filename (object) or the command (verb).