2 ms·
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 defaul
by Symbiote 7y ago
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.
- nerdponx 7y agoAlternatively you can use ZMV http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#index-zmv http://zsh.sourceforge.net/Doc/Release/User-Contributions.ht... https://unix.stackexchange.com/a/19291/73256 https://unix.stackexchange.com/a/19291/73256