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

svn completion under Cygwin



 Hello,

 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

http://zsh.cvs.sourceforge.net/*checkout*/zsh/zsh/Completion/Unix/Command/_subversion?revision=1.25

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 '\\' '/'"
   fi

   (( ${(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,

 Thanks,
VZ

Attachment: pgp4qHQItZn3u.pgp
Description: PGP signature



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