Skip to content

Two-step file copy/move. Specify source file(s) in one command, cd to another directory, paste there.

License

Notifications You must be signed in to change notification settings

b1f6c1c4/cp-mv-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Two-step file copy/move. Specify source file(s) in one command, cd to another directory, paste there.

Topics

Resources

License

Stars

Watchers

Forks

Languages