From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24827 invoked from network); 11 Oct 2006 15:44:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Oct 2006 15:44:02 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 68226 invoked from network); 11 Oct 2006 15:43:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Oct 2006 15:43:53 -0000 Received: (qmail 21682 invoked by alias); 11 Oct 2006 15:43:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22865 Received: (qmail 21672 invoked from network); 11 Oct 2006 15:43:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Oct 2006 15:43:50 -0000 Received: (qmail 67921 invoked from network); 11 Oct 2006 15:43:50 -0000 Received: from flock1.newmail.ru (80.68.241.157) by a.mx.sunsite.dk with SMTP; 11 Oct 2006 15:43:46 -0000 Received: (qmail 2975 invoked from network); 11 Oct 2006 15:43:44 -0000 Received: from unknown (HELO cooker.local) (arvidjaar@newmail.ru@83.237.228.122) by smtpd.newmail.ru with SMTP; 11 Oct 2006 15:43:44 -0000 From: Andrey Borzenkov To: zsh-workers@sunsite.dk Subject: Re: Please add pinfo completion Date: Wed, 11 Oct 2006 19:43:38 +0400 User-Agent: KMail/1.9.4 References: <20061007013551.GE8188@prunille.vinc17.org> <200610110648.45199.arvidjaar@newmail.ru> <200610110933.k9B9XJTB021853@news01.csr.com> In-Reply-To: <200610110933.k9B9XJTB021853@news01.csr.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610111943.43143.arvidjaar@newmail.ru> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Was it intentionally sent to me personally and not to list? On Wednesday 11 October 2006 13:33, you wrote: > Andrey Borzenkov wrote: > > On Tuesday 10 October 2006 21:59, Peter Stephenson wrote: > > > OK, here is _arguments updated to provide option descriptions from > > > --help text automatically. > > > > I do not think it should be done unconditionally. > > Do what unconditionally? > > Running --help has never been done unconditionally, I should not answer 5 minutes before going off to work :( > only under the > control of specific completions like _tar and _configure, or if > requested via _gnu_generic. That hasn't changed; I've only upgraded > the way it fetches descriptions. There is some minimal sanity checking > for some of these programmes and I would be happy to add more. > I misunderstood your patch. I assumed it was now calling 'command --help' for all _arguments invocations and was using its output in preference to descriptions given on command line. OK so we now have two possiblities - - nice localized output but without any possibility to give specific options' argument(s) completion - - unlimited freedom in completing options limited to hardcoded english descriptions. Now when you are probably the only person understanding how _argument works - any chances to merge the above? I.e. extra option to _arguments (something like _agruments -h help_option, where help_option is variable) to request description for options? This does not need all this hairy processing or recognizing of *=FILE or like - just fetch options with help text and use it instead of supplied one if found. This gives l10n for large part of commands for free. I leave the rest for list to see (I do not see any personal info here :) > For example, we could ensure that "configure" was run with an explicit > path such as ./configure or ../configure and if not refuse to run it > with --help; or we could refuse to do it as root without a further style > set by the user. > > The descriptions themselves have never been printed unconditionally, > only under the control of the verbose option. You can turn this off, > for example, for tar completion under all contextual completers with > > zstyle ':completion::*:tar:*' verbose false > > > And finally it opens up a can of worms that is called l10n. Now-a-days > > you almost sure gets localized help output; so be prepared for questions > > "why this one appears in Russian and this one not" :) > > This is surely a great deal easier for automatically generated > descriptions than otherwise; none of LC_* or LANG are reset in > _arguments. The only big issue I can see is with the additional logic > to match *=FILE* and *=(DIR|PATH)* patterns and turn them into the > appropriate sort of completion. > > A simple hash-bashed function system for localization of this sort of > thing wouldn't be too hard to implement; it's a much easier task than > doing the same for the main shell. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD4DBQFFLREuR6LMutpd94wRAmqdAKCKWQYADPnsnavZBb61MqHVOQOFdgCYuep5 jEddMDSQEpUYpCtDIoHc9g== =Aeh6 -----END PGP SIGNATURE-----