diff --git a/plugins/cp/README.md b/plugins/cp/README.md index e8a9b6ccc..23734243c 100644 --- a/plugins/cp/README.md +++ b/plugins/cp/README.md @@ -25,7 +25,7 @@ The enabled options for rsync are: * `-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". +* `--backup-dir="/tmp/rsync-$USERNAME"`: move backup copies to "/tmp/rsync-$USERNAME". * `-e /dev/null`: only work on local files (disable remote shells). diff --git a/plugins/cp/cp.plugin.zsh b/plugins/cp/cp.plugin.zsh index fe6ea87a8..a56259106 100644 --- a/plugins/cp/cp.plugin.zsh +++ b/plugins/cp/cp.plugin.zsh @@ -1,4 +1,4 @@ cpv() { - rsync -pogbr -hhh --backup-dir=/tmp/rsync -e /dev/null --progress "$@" + rsync -pogbr -hhh --backup-dir="/tmp/rsync-${USERNAME}" -e /dev/null --progress "$@" } compdef _files cpv