about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-01-16 15:29:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-01-16 15:29:26 +0000
commit4cddde6df564b295bbb60e226177f005582bc5f5 (patch)
treeadb96ef067fb5612aaec93122a98a70f30e861c0
parenta06990cc45a47439b1527b7ced8b8aec44e65b10 (diff)
downloadzsh-4cddde6df564b295bbb60e226177f005582bc5f5.tar.gz
zsh-4cddde6df564b295bbb60e226177f005582bc5f5.tar.xz
zsh-4cddde6df564b295bbb60e226177f005582bc5f5.zip
19382: improved zmv documentation
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Misc/zmv7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 21dea7d74..3ca8af6ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-16  Peter Stephenson  <pws@csr.com>
+
+	* 19382: Functions/Misc/zmv: better error message if move failed
+	due to file system not recognising new name as being different.
+
 2004-01-15  Oliver Kiddle  <opk@zsh.org>
 
 	* 19378: Completion/Debian/Command/_update-rc.d,
diff --git a/Functions/Misc/zmv b/Functions/Misc/zmv
index 8f8d15a7d..553579232 100644
--- a/Functions/Misc/zmv
+++ b/Functions/Misc/zmv
@@ -263,7 +263,12 @@ for f in $files; do
   elif [[ -n $from[$g] && ! -d $g ]]; then
     errs=($errs "$f and $from[$g] both map to $g")
   elif [[ -f $g && -z $opt_f ]]; then
-    errs=($errs "file exists: $g")
+    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
   fi
   from[$g]=$f
   to[$f]=$g