Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vcs_info and locales
- X-seq: zsh-workers 27908
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: vcs_info and locales
- Date: Sun, 25 Apr 2010 16:29:26 +0200
- In-reply-to: <8739yjoc84.fsf@xxxxxxxxxxxxxxxxxxxxxx> (Frank Terbeck's message of "Sun, 25 Apr 2010 16:09:31 +0200")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20100424234017.776ae0ea@coriolan> <87aassncyk.fsf@xxxxxxxxxxxxxxxxxxxxxx> <20100425131944.GA55789@xxxxxxxxxxxxxxxxxxxx> <8739yjoc84.fsf@xxxxxxxxxxxxxxxxxxxxxx>
Frank Terbeck wrote:
[...]
> Here's a patch that does exactly that.
Well, not *exactly*... Mikael just told me on IRC, that I'm un-setting
`LC_ALL' before assigning its old value to `LANG'.
Here's another try.
---------- >8 ----------
From 07cabca511cbfdec4401ff660e078f75f3f6a954 Mon Sep 17 00:00:00 2001
From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Apr 2010 16:00:09 +0200
Subject: PATCH: vcs_info: Avoid locale related problems
This is to avoid problems with output from external commands with non-C
locales as reported by FranÃois Gannaz in workers-27900.
---
Functions/VCS_Info/vcs_info | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info
index a9e65e1..7ae1123 100644
--- a/Functions/VCS_Info/vcs_info
+++ b/Functions/VCS_Info/vcs_info
@@ -47,11 +47,17 @@ vcs_info () {
local pat
local -i found
local -a enabled disabled dps
- local -x usercontext vcs rrn
+ local -x usercontext vcs rrn LC_MESSAGES
local -ix maxexports
local -ax msgs
local -Ax vcs_comm
+ LC_MESSAGES=C
+ if [[ -n ${LC_ALL} ]]; then
+ local -x LANG
+ LANG=${LC_ALL}
+ local -x LC_ALL
+ fi
vcs='-init-'; rrn='-all-'
usercontext=${1:-default}
--
1.7.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author