Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

svn completion under Cygwin


 My Cygwin zsh 4.3.2 doesn't complete any file names for "svn ci" (and
other svn subcommands) and the problem persists even when using the latest
completion file version from


I couldn't really understand where exactly does the problem come from to be
honest but, as this works under Unix I was almost sure that it was due to
either "\r\n" line terminators or backslashes instead of slashes in the
output of Win32 svn version. It turned out to be the latter and so the
following trivial patch makes the completion work as expected:

--- _subversion.orig    2008-09-15 18:29:24.788071400 +0200
+++ _subversion 2008-09-15 18:29:33.412740200 +0200
@@ -194,7 +194,7 @@
   local pat="${1:-([ADMR~]|?M)}"

   if (( ! $+_cache_svn_status[$dir] )); then
-    _cache_svn_status[$dir]="$(_call_program files svn status -N $dir)"
+    _cache_svn_status[$dir]="$(_call_program files svn status -N $dir) | tr '\\' '/'"

   (( ${(M)#${(f)_cache_svn_status[$dir]}:#(#s)${~pat}*$REPLY} ))

This is almost surely not the best way to fix it but maybe this is going to
be useful to somebody. And if anybody could propose a better fix which
could be included in the next versions of zsh it would be great,


Attachment: pgp4qHQItZn3u.pgp
Description: PGP signature

Messages sorted by: Reverse Date, Date, Thread, Author