4 ms·
even better (if you are using bash, not sure about other shells) and use shopt -s histverify then if you type !$<enter> will replace !$ with /somedir but not
by nwomack 16y ago
even better (if you are using bash, not sure about other shells) and use
shopt -s histverify
then if you type !$<enter> will replace !$ with /somedir but not hit return, so you could then modify it. Then you could do...
mv somefile -t /somedir
vim !$<enter>/somefile
- steve___ 16y agoTry adding this to your .inputrc file $if Bash Space: magic-space $endif Now the history expansion will be done when 'space' is pressed.