zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#291683: zsh completion for svn fails with german locale
       [not found] <E1CsJQN-0000eI-Ms@antigone.intern.321-verkaufsagentur.de>
@ 2005-01-22 21:02 ` Clint Adams
       [not found]   ` <1106506585.10831.1.camel@localhost>
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2005-01-22 21:02 UTC (permalink / raw)
  To: zsh-workers; +Cc: Philipp Meier, 291683-forwarded

> The completion functions for svn build the command list based on the
> output of the svn commands. This parsing fails for non-english locales.
> A fix will be either to change the parsing regexes or to call
> the svn command with locale "C".
> A workaround is to use a english locale.

Does this patch fix your problem?

--- orig/Completion/Unix/Command/_subversion
+++ mod/Completion/Unix/Command/_subversion
@@ -41,7 +41,7 @@
   if (( ! $+_svn_cmds )); then
     typeset -gA _svn_cmds
     _svn_cmds=(
-      ${=${(f)${${"$(_call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
+      ${=${(f)${${"$(LANG=C _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
     )
   fi
 
@@ -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)"$(LANG=C _call_program options 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)"$(LANG=C _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]}
   )
 
   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)${${"$(LANG=C _call_program commands 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)"$(LANG=C _call_program options 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)"$(LANG=C _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]}
   )
 
   [[ "$_svnadmin_subcmd_usage" == *REPOS_PATH* ]] &&


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug#291683: zsh completion for svn fails with german locale
       [not found]   ` <1106506585.10831.1.camel@localhost>
@ 2005-01-23 19:45     ` Clint Adams
  2005-01-23 19:54       ` Clint Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2005-01-23 19:45 UTC (permalink / raw)
  To: Philipp Meier; +Cc: zsh-workers, 291683

> > > The completion functions for svn build the command list based on the
> > Does this patch fix your problem?
> works fine. Thanks.

Okay, I'll apply the fix.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug#291683: zsh completion for svn fails with german locale
  2005-01-23 19:45     ` Clint Adams
@ 2005-01-23 19:54       ` Clint Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Clint Adams @ 2005-01-23 19:54 UTC (permalink / raw)
  To: zsh-workers, 291683

> Okay, I'll apply the fix.

Changing LANG to LC_MESSAGES..


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-23 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1CsJQN-0000eI-Ms@antigone.intern.321-verkaufsagentur.de>
2005-01-22 21:02 ` Bug#291683: zsh completion for svn fails with german locale Clint Adams
     [not found]   ` <1106506585.10831.1.camel@localhost>
2005-01-23 19:45     ` Clint Adams
2005-01-23 19:54       ` Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).