diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-05-14 17:58:57 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-05-14 17:58:57 +0000 |
commit | a11fbaf68c2bf81424c1ca8381e2043b5b56711b (patch) | |
tree | 0e0a19b5f9a259dd49351ca74c5cab5d40cf76bc /Functions/Misc/zmv | |
parent | a8d47caea17f0705c570e30d8a91c84c07ddf26b (diff) | |
download | zsh-a11fbaf68c2bf81424c1ca8381e2043b5b56711b.tar.gz zsh-a11fbaf68c2bf81424c1ca8381e2043b5b56711b.tar.xz zsh-a11fbaf68c2bf81424c1ca8381e2043b5b56711b.zip |
11484: allow zmv to rename to equivalent but differently named files
Diffstat (limited to 'Functions/Misc/zmv')
-rw-r--r-- | Functions/Misc/zmv | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Functions/Misc/zmv b/Functions/Misc/zmv index 553579232..e85b0b5ae 100644 --- a/Functions/Misc/zmv +++ b/Functions/Misc/zmv @@ -262,13 +262,8 @@ for f in $files; do continue elif [[ -n $from[$g] && ! -d $g ]]; then errs=($errs "$f and $from[$g] both map to $g") - elif [[ -f $g && -z $opt_f ]]; then - if [[ $f != $g && $f -ef $g ]]; then - errs=($errs "file exists: $g -(Probably the same file, owing to file system limitations.)") - else - errs=($errs "file exists: $g") - fi + elif [[ -f $g && -z $opt_f && ! ($f -ef $g && $action = mv) ]]; then + errs=($errs "file exists: $g") fi from[$g]=$f to[$f]=$g |