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

vcs_info and locales



Hi

As I installed my zsh prompt on another computer, vcs_info stopped working for
svn repositories, it didn't print the branch nor the revision. It was just
because I had a french locale, and so vcs_info could not parse the output of
"svn info". The locale had no effect on hg/git, but I didn't fully test them.

So I suggest either to fix the documentation or (better) fix the code.

In the documentation, for the example in the quickstart:
- precmd () { vcs_info }
+ precmd () { LC_ALL=C vcs_info }

In the code:

--- VCS_Info/Backends/VCS_INFO_get_data_svn	2010-02-21 20:48:23.000000000 +0100
+++ VCS_INFO_get_data_svn	2010-04-24 23:28:03.000000000 +0200
@@ -10,10 +10,10 @@
 
 svnbase=".";
 svninfo=()
-${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
+LC_ALL=C ${vcs_comm[cmd]} info --non-interactive | while IFS=: read a b; do svninfo[${a// /_}]="${b## #}"; done
 while [[ -d "${svnbase}/../.svn" ]]; do
     parentinfo=()
-    ${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
+    LC_ALL=C ${vcs_comm[cmd]} info --non-interactive "${svnbase}/.." | while IFS=: read a b; do parentinfo[${a// /_}]="${b## #}"; done
     [[ ${parentinfo[Repository_UUID]} != ${svninfo[Repository_UUID]} ]] && break
     svninfo=(${(kv)parentinfo})
     svnbase="${svnbase}/.."

BTW, changing the command with:
	zstyle ':vcs_info:svn:*:-all-' command "LC_ALL=C svn"
didn't work at all, and I don't understand why.

Regards
--
FranÃois



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