From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17783 invoked from network); 7 Oct 2006 12:13:11 -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=-1.9 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,INFO_TLD autolearn=no 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; 7 Oct 2006 12:13:11 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 68150 invoked from network); 7 Oct 2006 12:13:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 12:13:05 -0000 Received: (qmail 118 invoked by alias); 7 Oct 2006 12:12:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22839 Received: (qmail 98 invoked from network); 7 Oct 2006 12:12:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Oct 2006 12:12:55 -0000 Received: (qmail 66936 invoked from network); 7 Oct 2006 12:12:55 -0000 Received: from flock1.newmail.ru (80.68.241.157) by a.mx.sunsite.dk with SMTP; 7 Oct 2006 12:12:54 -0000 Received: (qmail 2994 invoked from network); 7 Oct 2006 12:12:52 -0000 Received: from unknown (HELO cooker.local) (arvidjaar@newmail.ru@83.237.106.22) by smtpd.newmail.ru with SMTP; 7 Oct 2006 12:12:52 -0000 From: Andrey Borzenkov To: zsh-workers@sunsite.dk Subject: Re: info completion doesn't complete on local info files Date: Sat, 7 Oct 2006 16:12:41 +0400 User-Agent: KMail/1.9.4 References: <20061007013034.GD8188@prunille.vinc17.org> <200610071030.12601.arvidjaar@newmail.ru> <20061007093106.GI8188@prunille.vinc17.org> In-Reply-To: <20061007093106.GI8188@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2646277.Q486Qm5TjZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610071612.49471.arvidjaar@newmail.ru> --nextPart2646277.Q486Qm5TjZ Content-Type: multipart/mixed; boundary="Boundary-01=_8m5JFMjIdJLnIWz" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_8m5JFMjIdJLnIWz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 07 October 2006 13:31, Vincent Lefevre wrote: > On 2006-10-07 10:30:11 +0400, Andrey Borzenkov wrote: > > According to man info, it should be 'info -f mprf.info'; that is > > also how I wrote completion :) Do you have reference to more up to > > date info documentation? > > No, but giving a filename (relative to INFOPATH, absolute or starting > with ./) works without the -f option. I think this represent the top > node of an info file, hence the behavior. Would be nice if it were documented (of course not something someone dealin= g=20 with Zsh has the rights to complaint about :) How does it work for you? BTW as I understand _arguments sets up explanation also for -> cases; any=20 chance to access them? Passing empty message (:::->foo) is an error; but=20 accidentally supplying different messages in _arguments and later in direct= =20 completion calls (like ::menu items:->items and later on _describe 'menu=20 item') makes it believe there are two set of matches attached due to line length. --Boundary-01=_8m5JFMjIdJLnIWz Content-Type: text/x-diff; charset="iso-8859-1"; name="_texinfo.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="_texinfo.diff" Index: Completion/Unix/Command/_texinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_texinfo,v retrieving revision 1.5 diff -u -p -r1.5 _texinfo =2D-- Completion/Unix/Command/_texinfo 21 Jan 2004 13:53:29 -0000 1.5 +++ Completion/Unix/Command/_texinfo 7 Oct 2006 12:03:42 -0000 @@ -21,7 +21,7 @@ case $service in '--subnodes[recursively output menu items]' \ '--vi-keys[use Vi-like key bindings]' \ '(: -)--version[display version information]' \ =2D '(--apropos -h --help -O --output --version)*::menu items:->item' = && ret=3D0 + '(--apropos -h --help -O --output --version)*::menu item:->item' && = ret=3D0 =20 info=3D( $info {(kv)opt_args[(I)(-d|--directory|-f|--file)]} ) ;; @@ -146,11 +146,25 @@ esac =20 case $state in item ) =2D local -a items + local -a items tags expl infopath + (( $#INFOPATH )) && infopath=3D( -W ${s/:/INFOPATH} ) =20 =2D items=3D(${${(M)${${(f)"$(${info} --output - ${words[1,CURRENT-1]} 2= >/dev/null)"}[1,(r)[[:space:]]#--- The Detailed Node Listing ---[[:space:]]= #]}:#\* *~\* Menu:*}:/(#b)\*[[:space:]]##([^:]##):(#B)( \(?##\)[^.]#.|(:|))= [[:space:]]#(#b)(*)[[:space:]]#/$match[1]${match[2]:+:}$match[2]}) + tags=3D(items) + if [[ $CURRENT -eq 1 ]]; then + tags+=3Dfiles + fi + + _tags $tags + while _tags; do + if _requested files expl 'info file'; then + _files "$expl[@]" $infopath -g '*.info' && ret=3D0 + fi + if _requested items; then + items=3D(${${(M)${${(f)"$(${info} --output - ${words[1,CURRENT-1]} 2>= /dev/null)"}[1,(r)[[:space:]]#--- The Detailed Node Listing ---[[:space:]]#= ]}:#\* *~\* Menu:*}:/(#b)\*[[:space:]]##([^:]##):(#B)( \(?##\)[^.]#.|(:|))[= [:space:]]#(#b)(*)[[:space:]]#/$match[1]${match[2]:+:}$match[2]}) =20 =2D _describe -t items "menu items" items && ret=3D0 + _describe -t items "menu item" items && ret=3D0 + fi + done ;; esac =20 --Boundary-01=_8m5JFMjIdJLnIWz-- --nextPart2646277.Q486Qm5TjZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFJ5nAR6LMutpd94wRAo+TAJwKLaLBRqcUN8FOKoVo+E9D0G+P9wCfWY1t g5C7m+nf9Lqv5CYPeYPpmjw= =SbBK -----END PGP SIGNATURE----- --nextPart2646277.Q486Qm5TjZ--