From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21888 invoked from network); 8 Aug 2021 15:58:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Aug 2021 15:58:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628438317; b=qh4Z4JSJGRk2i1BuYhxX862a7NyJaREXAQfTT8VQ5UnScw3OcG/qdnpqqX1jqiDYUGA7t6nVYZ vlXDimgJmLwzSqdnPDaPmpf93V94liCmCN6IZQTZ+3wqSmvzfKiPWmCLVM9vMGDPOIHEXrSnS1 QDn2SkSfuFd75jHOCrg/gaEEDW0SJTdPASGj6IDjN4176cDWLD5kHR3+LPU7FKkIR6g8FZ1jKk nbXVW7ULCpDoJisS9qjGfeaBnhfuvyDVtMbHqCO6ZYCS4cHBFyyElK6duQXUohM68GY2Pz07tU XeDcmhDGj2JhlusT+HASmhXMqlp7geB8Fo9imTdZeihI5A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628438317; bh=IOTI76AF96vPcT1bWBoa1VBt02XAF5KZdP9bkbql1Lo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=j634WhtcVVFVLaDKoGgyYMgdsvB5m6Oaa2sbDin5XLwPk9+G2vBDeq1nIwt0GfJT4XjQlqnG52 tczxQMV8fN/zYgWPTCtn/S5LWq7qMa6Bfa4cBLqiWwZ0seJskPSc43nYM/LhIpy1YDZ/Q7XPLR y2ctvI890r+LKqerm/Y1q4/AQe6v6pewWLI03wfmUFpoC0al+eal6NGPDybpxCPvvnNpWt6Lfm cLiNXAa0H6hvo/vt7gj5QuL0V/h1QL+ncwzunLLczDVMgIe1klH2c3myggEI9EcCiD+OEzgLoT rHxWqn37h4jliigsW3waXqjHqT7yP7BPK6dJoeJp9ugnMw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=kzlB1jEXFPVAvc5P49qlYoo7WVqhOGjNR98ZWkBrwpk=; b=S+SM9NmjfiU0nKdm0ZknITtW8R 1i4SAwvhRyd6b0qIZdamF8J6nhENxvKAnzfSNURxcCZSqtbAVOrY/cmGgkp94yKoBkZufOcRQr4j3 1edkOTF7cr0dSfxAgsFJk/eyBmnc0oeaNF2xko7A6pQKNYfqUiRrqkFZBS4znRNFG24jvEAuT8RG5 6hXBvbFZ70Obe8RLoN5VFh8eTUPanXLeaCU4UXDwRlHIOTVRT4DQrGwZw2+RJ4KfZvGiI/nyCDWzq ucRtllhMn9zvE4yVolGkmD3iDUqWTxX9G0/erAMyhttG0L1JctuwYhcDTqa4XVc+dkRsG45YW6E4j zsyrkAEg==; Received: from authenticated user by zero.zsh.org with local id 1mClC8-000NCB-RV; Sun, 08 Aug 2021 15:58:36 +0000 Authentication-Results: zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; dmarc=none header.from=chazelas.org; arc=none Received: from relay1-d.mail.gandi.net ([217.70.183.193]:48191) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mClBd-000MuZ-Mw; Sun, 08 Aug 2021 15:58:06 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 0EAB5240004; Sun, 8 Aug 2021 15:58:04 +0000 (UTC) Date: Sun, 8 Aug 2021 16:58:04 +0100 From: Stephane Chazelas To: Oliver Kiddle Cc: Zsh hackers list Subject: Re: info completion doesn't offer index entries any longer Message-ID: <20210808155804.v7di4mpoyyis7h4k@chazelas.org> Mail-Followup-To: Oliver Kiddle , Zsh hackers list References: <20210801160547.zf37spd5ui7dfj4a@chazelas.org> <20210801162439.nfs6b7v6i2c6luqw@chazelas.org> <26560-1628150003.918228@jgeh.uisY.RfGy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26560-1628150003.918228@jgeh.uisY.RfGy> X-Seq: 49263 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: 2021-08-05 09:53:23 +0200, Oliver Kiddle: [...] > > > $ info -k '' | wc > > > 47919 267467 2341131 > > You clearly have vastly more on your system than I have. I would guess > that among that extra output is an entry or entries that need additional > quoting or something and are breaking _describe - colons perhaps. Most of those are from a dozen of info manuals: $ info -k '' | grep -Po '^"\(\K[^)]*' | uniq -c | sort -rn | pr -t3 4979 gcc 650 kpathsea 179 diffutils 4820 libc 501 flex 177 gawkinet 4143 gcal 500 nettle 158 datamash 3641 gdb 479 bash 150 rcs 2740 zsh 463 autogen 105 find 2682 gawk 409 info-stnd 103 grub 2679 coreutils 372 tlbuild 86 stabs 2500 groff 355 m4 51 libffi 2437 gnulib 353 sed 51 history 1975 texinfo 336 readline 51 gperf 1356 recode 325 screen 15 cpio 1316 gettext 271 texi2html 8 time 1157 automake-1 269 ssed 8 texinfo 843 tar 268 grep 8 gzip 809 gnupg 247 mtools 5 ssip 806 web2c 231 wget 1 grub-dev 792 cvs 192 gawkworkflow 1 gawk 680 dvips 186 speech-dispatch (not sure why there should be only one entry for gawk for instance though). [...] > I think that method only retrieves the menu for the top level of the > manual. It makes more difference with some documentation than others. You're right, I was too quick to jump to conclusions. > There is no actual attempt to complete anything for --index-search= > What do you think we should do there? Well, I was hoping zsh would give me similar completion as info's i would. $ info -k '' | grep -iPo '^"\Q(zsh)\E.*" -- \Kread' | sort -u read READ That's not the same as what info i completion gives me on "read" though: 8 completions: read read-from-minibuffer READNULLCMD READNULLCMD, ignoring <1> read-command reading a line READNULLCMD, ignoring READNULLCMD, use of I must have misunderstood what info -k does. Doing the same as i's completion may require parsing the contents of the info file directly. > > Evidence of that is that fixing that "info -k" to intended "info > > -k ''" doesn't seem to change much if at all the behaviour (but > > makes the completion significantly slower). > > > > Also, caching doesn't seem to work properly as "info -k ''" > > seems to be invoked every time. > > It does appear to work in my testing. Does the cache variable get set in > your case? Again, I suspect something peculiar to the longer info -k '' > output on your system is causing issues for the basic nested parameter > expansion that parses the output. [...] What I mean is that I'd expect info -k '' would only need to be run once within a single interactive zsh session. When I instrument it with info() { echo info called>/dev/tty; command info "$@";} I can see info being called each time I complete info zsh something for instance. -- Stephane