From 15900e7778e8c657bf2f7045fc38b26cc4a13e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 21 Sep 2016 22:58:49 +0200 Subject: [PATCH] cp plugin: remove `--` to separate files from options This has some undesired effects, like having `cpv --help` be a file not found error. Use `--` yourself if you need it: ```zsh cpv -- -some-file-with-hyphens.txt /tmp ``` --- plugins/cp/README.md | 2 -- plugins/cp/cp.plugin.zsh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/cp/README.md b/plugins/cp/README.md index d2cc64ff7..e8a9b6ccc 100644 --- a/plugins/cp/README.md +++ b/plugins/cp/README.md @@ -30,5 +30,3 @@ The enabled options for rsync are: * `-e /dev/null`: only work on local files (disable remote shells). * `--progress`: display progress. - -* `--`: everything after this is an argument, even if it starts with a hyphen. diff --git a/plugins/cp/cp.plugin.zsh b/plugins/cp/cp.plugin.zsh index 607a24b40..fe6ea87a8 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 -e /dev/null --progress "$@" } compdef _files cpv