8 ms·
You can use m-p/n as you mention, same as, say, in regular bash, or search. Or c-c c-p, c-c c-o etc. But TBH I mostly just use the ordinary ! syntax (e.g. `!!
by gumby 3y ago
You can use m-p/n as you mention, same as, say, in regular bash, or search. Or c-c c-p, c-c c-o etc.
But TBH I mostly just use the ordinary ! syntax (e.g. `!!` or `!bla:*` or !200 etc) because it’s even faster and works fine even when no editing is available at all.
So if I used find to search for an executable it’s just so effortless to type ./`!!|head -1` rather than searching up, selecting and copying a region, going back to the end, editing it, blah blah. Or even worse, reaching for the mouse.
- notbeuller 3y agoI wonder what percentage of even frequent shell users are even aware of !! or ^subst^ - an informal polling of 5 workmates here (engineers, command line git users, people I would have thought would know) shows no takers. To be fair, I'm old and was thrilled to go from 300 to 1200 baud at one point.
- gumby 3y agoWow, I assumed it was universal. Retyping things, or copying and editing is so tedious.
- guenthert 3y agoI recall that at University a lecturer showed this briefly in the early nineties. Most of us students stared in a mixture of awe and disbelief. I didn't learn those incantation from that brief introduction and never felt the need, even though I used a 2400 baud modem (already outdated, hence cheap) then.
- m463 3y agoI use control-r a LOT. It lets you look at and edit what you'll re-type. I use it for complicated commands I ran yesterday and the day before. Unfortunately my hands are wired for control-r (caps lock = ctrl) and not meta-r. Hard to figure out the ROI of re-learning. (still emacs recall history doesn't seem to reflect bash history, which I routinely set to 10k commands)