Hacker News new | ask | show | jobs
by nwomack 5689 days 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

1 comments

Try adding this to your .inputrc file

  $if Bash
    Space: magic-space
  $endif
Now the history expansion will be done when 'space' is pressed.