245eee128bc27e560720c74cba0437bb346a25ef

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1319 from skatkov/master

Replace cp -verbose with rsync

Diff

 1diff --git a/plugins/cp/cp.plugin.zsh b/plugins/cp/cp.plugin.zsh
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..7355a99902792ba5875256322da3997b3e348760
 4--- /dev/null
 5+++ b/plugins/cp/cp.plugin.zsh
 6@@ -0,0 +1,14 @@
 7+#Show progress while file is copying
 8+
 9+# Rsync options are:
10+#  -p - preserve permissions
11+#  -o - preserve owner
12+#  -g - preserve group
13+#  -h - output in human-readable format
14+#  --progress - display progress
15+#  -b - instead of just overwriting an existing file, save the original
16+#  --backup-dir=/tmp/rsync - move backup copies to "/tmp/rsync"
17+#  -e /dev/null - only work on local files
18+#  -- - everything after this is an argument, even if it looks like an option
19+
20+alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --"