Windows-like file copy/paste utility for bash/zsh/etc.
$ cd /src/dir
$ cp foo
$ mv bar
$ cd /dst
$ pst ./dir
cp -R /src/dir/foo /dst/dir
mv /src/dir/bar /dst/dir
$ ls
foo bar
git clone --depth=1 https://github.com/b1f6c1c4/cp-mv-paste
And then either:
- Use shell alias
- Add to PATH
ln -s
to somewhere in PATH
cp
/ mv
:
Usage:
{cp,mv} <file>
{cp,mv} -- <files> ...
All other calling forms will be forwarded to /usr/bin/{cp,mv}.
pst
:
Usage: pst [-n|--dry-run|--abort] [<target>]
-n|--dry-run: List file operations but don't execute.
--abort: List file operations and abort them all.
- It doesn't support copy/move across ssh sessions.
- The file list is persistent after reboot.
- If you forget to
pst --abort
, you may accidentally copy/move more files than you need.
MIT