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

Re: SVN completion problem



* Peter Stephenson <pws@xxxxxxx> [04.08.2005 13:51]:
> In the latest version svn already gets called with LC_MESSAGES=C to
> work around this.  Do you have an old version?  The file in the
> source bundle is Completion/Unix/Command/_subversion.

My zsh version is:

#v+
ediap@lespaul ~ % qpkg -I -v zsh
app-shells/zsh-4.2.5 *
#v-

It seems that it is the latest stable release denoted in
http://zsh.sunsite.dk/News/

OK. I managed to fix the `_subversion' file by adding LC_ALL=C and now
it works...

Here is a patch:

#v+
--- _subversion	2005-08-04 13:50:29.000000000 +0200
+++ _subversion.new	2005-08-04 13:53:54.000000000 +0200
@@ -64,10 +64,10 @@
 _svn_subcommand () {
   local subcmd _svn_subcmds _svn_subcmd_usage
 
-  _svn_subcmd_usage=${${(M)${(f)"$(_call_program options svn help $1)"}:#usage:*}#usage: $1 }
+  _svn_subcmd_usage=${${(M)${(f)"$(_call_program options LC_ALL=C svn help $1)"}:#usage:*}#usage: $1 }
 
   _svn_subcmds=(
-    ${${=${${${(M)${(f)"$(_call_program options svn help $1)"##*Valid options:}:#* :*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]}
+    ${${=${${${(M)${(f)"$(_call_program options LC_ALL=C svn help $1)"##*Valid options:}:#* :*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]}
   )
 
   case $1 in;
@@ -108,7 +108,7 @@
   if (( ! $+_svnadmin_cmds )); then
     typeset -gA _svnadmin_cmds
     _svnadmin_cmds=(
-      ${=${(f)${${"$(_call_program commands svnadmin help)"#l#*Available subcommands:}}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
+      ${=${(f)${${"$(_call_program commands LC_ALL=C svnadmin help)"#l#*Available subcommands:}}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
     )
   fi
 
@@ -131,10 +131,10 @@
 _svnadmin_subcommand () {
   local subcmd _svnadmin_subcmds _svnadmin_subcmd_usage
 
-  _svnadmin_subcmd_usage=${${(M)${(f)"$(_call_program options svnadmin help $1)"}:#$1: usage:*}#$1: usage: svnadmin $1 }
+  _svnadmin_subcmd_usage=${${(M)${(f)"$(_call_program options LC_ALL=C svnadmin help $1)"}:#$1: usage:*}#$1: usage: svnadmin $1 }
 
   _svnadmin_subcmds=(
-    ${${=${${${(M)${(f)"$(_call_program options svnadmin help $1)"##*Valid options:}:#*:*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]}
+    ${${=${${${(M)${(f)"$(_call_program options LC_ALL=C svnadmin help $1)"##*Valid options:}:#*:*}%% #:*}/ arg/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}[2,-1]}
   )
 
   [[ "$_svnadmin_subcmd_usage" == *REPOS_PATH* ]] &&

#v-

Thanks for your help!

/ediap

-- 
-=#=-  Adam Piątyszek - "ediap"    -=#=-  Liunx ID: #204648         -=#=-
-=#=-  ediap (at) et.put.poznan.pl -=#=-  JID: ediap (at) chrome.pl -=#=-
-=#=-  http://ediap.prv.pl/        -=#=-  Gadu-Gadu: 1157376        -=#=-
-=#=-  PGP key ID: 0x341E22F0      -=#=-  ICQ: 3303291              -=#=-



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