oh-my-zsh/plugins/cp
ʇɹǝqƃǝᴉs puɐloɹ d5b851a7dd Improve cp-plugin: Show overall time & percentage.
Displays the overall time & percentage in a single self-updating line while copying with `cpv`.

Until now, `cpv` has shown that for individual files only instead of the whole operation, when copying recursively. See http://unix.stackexchange.com/a/65222 for details.

E.g.:

```
> cpv phone /media/user/Backup/phone
[...]
phone/DCIM/Camera/IMG_20150410_124506.dng
         16.37M 100%   14.88MB/s    0:00:01 (xfr#6035, ir-chk=2539/8915)
phone/DCIM/Camera/IMG_20150410_124506.jpg
          1.66M 100%    4.77MB/s    0:00:00 (xfr#6036, ir-chk=2538/8915)
phone/DCIM/Camera/IMG_20150410_124528.dng
         16.37M 100%   16.93MB/s    0:00:00 (xfr#6037, ir-chk=2537/8915)
phone/DCIM/Camera/IMG_20150410_124528.jpg
          1.68M 100%    1.40MB/s    0:00:01 (xfr#6038, ir-chk=2536/8915)
phone/DCIM/Camera/IMG_20150411_115839.dng
         16.37M 100%   31.31MB/s    0:00:00 (xfr#6039, ir-chk=2535/8915)
[... scrolling and scrolling ...]
```

vs. in simply one line updating itself:

```
> cpv phone /media/user/Backup/phone
         10.89G  26%   27.12MB/s    0:06:51 (xfr#8042, ir-chk=2174/10561)^C
```
2017-02-11 13:13:30 +01:00
..
cp.plugin.zsh Improve cp-plugin: Show overall time & percentage. 2017-02-11 13:13:30 +01:00
README.md Fix cp plugin completion and refactor (#5427) 2016-10-04 01:03:16 +02:00

cp plugin

This plugin defines a cpv function that uses rsync so that you get the features and security of this command.

To enable, add cp to your plugins array in your zshrc file:

plugins=(... cp)

Description

The enabled options for rsync are:

  • -p: preserves permissions.

  • -o: preserves owner.

  • -g: preserves group.

  • -b: make a backup of the original file instead of overwriting it, if it exists.

  • -r: recurse directories.

  • -hhh: outputs numbers in human-readable format, in units of 1024 (K, M, G, T).

  • --backup-dir=/tmp/rsync: move backup copies to "/tmp/rsync".

  • -e /dev/null: only work on local files (disable remote shells).

  • --progress: display progress.