Many, many times a day, I find myself wanting to copy one or two files from
~/src/some/different/path on my local machine, to
/srv/www/some/different/path respectively on a testing host. The two paths are identical after ~/src and /srv/www respectively -- although obviously I usually omit the filename on the second arg to scp, which I currently use.
Problem is, I quite often fat finger the scp invokation entirely and copy the file to the wrong directory, or overwrite a different file because tab complete manages to outsmart me. I could rsync my whole local tree to the server over ssh, but I sometimes don't want to upload the whole thing just yet -- just a specific file.
I guess what I want is simple CLI tool which will let me do (maybe with a little config) the moral equivalent of:
jkg5150@dev-laptop:~/src/myproject$ funkytool path/to/file another/path/another-file mydevhost.mycompany.com
file copied to
another-file copied to
Surely there's a trick I'm missing -- or should I just write one?