Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: simple completion example? (aptitude completion doesn't work)
- X-seq: zsh-workers 21571
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: simple completion example? (aptitude completion doesn't work)
- Date: Mon, 08 Aug 2005 11:06:20 +0200
- Cc: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- In-reply-to: <20050805193652.GA6842@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050802180158.GA10402@xxxxxxxxx> <19401.1123058911@xxxxxxxxxxxxxxxxxxxxxxx> <20050803101007.GA9755@xxxxxxxxx> <2356.1123064346@xxxxxxxxxxxxxxxxxxxxxxx> <20050805154030.GA16800@xxxxxxxxx> <32449.1123262228@xxxxxxxxxxxxxxxxxxxxxxx> <20050805193652.GA6842@xxxxxxxxx>
On 5 Aug, Andy Spiegl wrote:
> > If aptitude -h is giving you a German (or other) translation, try adding
> > LC_MESSAGES=C in but I don't think that translation would actually break
> > it in this particular case.
> YES, that was it! Of course, why didn't I think of that!?
We seem to be getting a lot of these translation related problems. Could
do with someone finding the time to look through for any further
instances.
> But there isn't such a big difference...Hm, maybe Verwendung instead of usage?
> Can you think of a workaround for international users like me?
In general, the patch below adding LC_MESSAGES=C does the job.
It's very tempting to try to make the parsing work with the German
output so that people get translated descriptions. However, if the
formats aren't consistent it's probably only asking for trouble. And the
completion code probably wouldn't handle the umlauts too well either.
Oliver
Index: Completion/Debian/Command/_aptitude
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_aptitude,v
retrieving revision 1.3
diff -u -r1.3 _aptitude
--- Completion/Debian/Command/_aptitude 31 Mar 2005 13:39:18 -0000 1.3
+++ Completion/Debian/Command/_aptitude 8 Aug 2005 08:59:44 -0000
@@ -26,7 +26,7 @@
case $state in
cmds)
- cmds=( ${${(M)${(f)"$(aptitude -h 2>/dev/null)"}:#* - *}/(#b) (*[^ ]) #- (*)/$match[1]:$match[2]:l})
+ cmds=( ${${(M)${(f)"$(LC_MESSAGES=C _call_program commands aptitude -h 2>/dev/null)"}:#* - *}/(#b) (*[^ ]) #- (*)/$match[1]:$match[2]:l})
_describe -t commands 'aptitude command' cmds && ret=0
;;
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author