* info completion doesn't complete on local info files @ 2006-10-07 1:30 Vincent Lefevre 2006-10-07 6:30 ` Andrey Borzenkov 2006-10-07 7:19 ` Stephane Chazelas 0 siblings, 2 replies; 6+ messages in thread From: Vincent Lefevre @ 2006-10-07 1:30 UTC (permalink / raw) To: zsh-workers Hi, I am in a directory where there's a file "mpfr.info". I want to read it with "info". So, I type: info ./m[TAB] but I don't get anything. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: info completion doesn't complete on local info files 2006-10-07 1:30 info completion doesn't complete on local info files Vincent Lefevre @ 2006-10-07 6:30 ` Andrey Borzenkov 2006-10-07 9:31 ` Vincent Lefevre 2006-10-07 7:19 ` Stephane Chazelas 1 sibling, 1 reply; 6+ messages in thread From: Andrey Borzenkov @ 2006-10-07 6:30 UTC (permalink / raw) To: zsh-workers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 07 October 2006 05:30, Vincent Lefevre wrote: > Hi, > > I am in a directory where there's a file "mpfr.info". I want to read > it with "info". So, I type: > > info ./m[TAB] > > but I don't get anything. 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? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFJ0l0R6LMutpd94wRAm+8AJ9Kr6QF5SCxaGRaSsuJGOBZCJQL6QCgn/sb WDgts75q7d99/FjAxTDSIvs= =Tf2i -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: info completion doesn't complete on local info files 2006-10-07 6:30 ` Andrey Borzenkov @ 2006-10-07 9:31 ` Vincent Lefevre 2006-10-07 12:12 ` Andrey Borzenkov 0 siblings, 1 reply; 6+ messages in thread From: Vincent Lefevre @ 2006-10-07 9:31 UTC (permalink / raw) To: zsh-workers 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. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: info completion doesn't complete on local info files 2006-10-07 9:31 ` Vincent Lefevre @ 2006-10-07 12:12 ` Andrey Borzenkov 2006-10-07 17:44 ` Andrey Borzenkov 0 siblings, 1 reply; 6+ messages in thread From: Andrey Borzenkov @ 2006-10-07 12:12 UTC (permalink / raw) To: zsh-workers [-- Attachment #1.1: Type: text/plain, Size: 1030 bytes --] 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 dealing 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 chance to access them? Passing empty message (:::->foo) is an error; but accidentally supplying different messages in _arguments and later in direct completion calls (like ::menu items:->items and later on _describe 'menu item') makes it believe there are two set of matches attached due to line length. [-- Attachment #1.2: _texinfo.diff --] [-- Type: text/x-diff, Size: 1956 bytes --] Index: Completion/Unix/Command/_texinfo =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_texinfo,v retrieving revision 1.5 diff -u -p -r1.5 _texinfo --- 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]' \ - '(--apropos -h --help -O --output --version)*::menu items:->item' && ret=0 + '(--apropos -h --help -O --output --version)*::menu item:->item' && ret=0 info=( $info {(kv)opt_args[(I)(-d|--directory|-f|--file)]} ) ;; @@ -146,11 +146,25 @@ esac case $state in item ) - local -a items + local -a items tags expl infopath + (( $#INFOPATH )) && infopath=( -W ${s/:/INFOPATH} ) - items=(${${(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=(items) + if [[ $CURRENT -eq 1 ]]; then + tags+=files + fi + + _tags $tags + while _tags; do + if _requested files expl 'info file'; then + _files "$expl[@]" $infopath -g '*.info' && ret=0 + fi + if _requested items; then + items=(${${(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]}) - _describe -t items "menu items" items && ret=0 + _describe -t items "menu item" items && ret=0 + fi + done ;; esac [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: info completion doesn't complete on local info files 2006-10-07 12:12 ` Andrey Borzenkov @ 2006-10-07 17:44 ` Andrey Borzenkov 0 siblings, 0 replies; 6+ messages in thread From: Andrey Borzenkov @ 2006-10-07 17:44 UTC (permalink / raw) To: zsh-workers -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 07 October 2006 16:12, Andrey Borzenkov wrote: > > How does it work for you? > Oops, could someone using (having) tkinfo verify that it is using the same first argument rules as plain info? I did not notice that they share this code. thank you -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFJ+d4R6LMutpd94wRApaUAKCtjnJB8x+i1V5i8400GT68QuyOMgCfafE3 /2OPLJuLMpXIoXZDP+wIVOU= =rDfH -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: info completion doesn't complete on local info files 2006-10-07 1:30 info completion doesn't complete on local info files Vincent Lefevre 2006-10-07 6:30 ` Andrey Borzenkov @ 2006-10-07 7:19 ` Stephane Chazelas 1 sibling, 0 replies; 6+ messages in thread From: Stephane Chazelas @ 2006-10-07 7:19 UTC (permalink / raw) To: zsh-workers On Sat, Oct 07, 2006 at 03:30:35AM +0200, Vincent Lefevre wrote: > Hi, > > I am in a directory where there's a file "mpfr.info". I want to read > it with "info". So, I type: > > info ./m[TAB] > > but I don't get anything. [...] info -f ./m[TAB] does though. -- Stéphane ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-10-07 17:44 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-10-07 1:30 info completion doesn't complete on local info files Vincent Lefevre 2006-10-07 6:30 ` Andrey Borzenkov 2006-10-07 9:31 ` Vincent Lefevre 2006-10-07 12:12 ` Andrey Borzenkov 2006-10-07 17:44 ` Andrey Borzenkov 2006-10-07 7:19 ` Stephane Chazelas
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).