Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 926 Bytes

README.md

File metadata and controls

52 lines (41 loc) · 926 Bytes

cp-mv-paste

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

Install

git clone --depth=1 https://github.com/b1f6c1c4/cp-mv-paste

And then either:

  1. Use shell alias
  2. Add to PATH
  3. ln -s to somewhere in PATH

Usage

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.

Limitation

  • 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.

License

MIT