Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Zsh users can instead add this to their .zshrc:

  autoload copy-earlier-word
  zle -N copy-earlier-word
  bindkey '^[,' copy-earlier-word
Then it's the default Alt-dot to copy the final argument of the previous command, and Alt-comma to copy the final argument of the current command. The move command is then "mv filename <Alt-Comma>".

Also, given this:

  echo 1 2 3
  echo 4 5 6
  echo 7 8 9
Then on the next command, Alt-dot will copy/replace 9→6→3. Pressing Alt-comma after Alt-dot will replace that with 8→7→echo.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: