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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20534 invoked from network); 22 Mar 2022 13:32:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Mar 2022 13:32:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1647955960; b=Yi3woa/xBifthFOMCv3Gq6PutZw9KyS+GASgOtIPKKUfFFOUJ5YPmTBfZSi7sKDw22ME5MePbj r42O/CoA+o540A1ryexeSoG6cliTCiDUy9lcc2cCmXoQ2kVjqxlwiqBkTe9qSNOX4hDpSKg33/ yNANCysjbD+ieV8z9FbyI3URECzxeUJm3deynUIjHnbf3ha/O2yGg+y6NVUoCS72FMFvH7RBgL ecSDHuzjc+mqwF5WwbTYs+lbUzbVLnRNVswR+U+9YqAqlhCo97V8GKGPgwHuv1Lml7iCh6DElj Zov3QID9ImoQON5z3LIDsp/WclzdZs3xXxgJOFLbCsqguw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1647955960; bh=d7qEIx7hoIHOrQkXIZM/qQe+0qoirs18QdrepVsozmk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=gGwqltrg/ueK3N1nJ+BMDYMcSJrZfo2T5BaHR+f9YvBrk8c/75F4UbAUe3Y3bcS3EPKhIr3kYJ PNaVj2BlVeod7NXoPIvqWzckyBHVh9HGLKxj0XhdKitVlmA5Az5xAUzv9TdseDfDgNKPlAeOEb 0IFAqqzAZsACBUzf0q5j3nWp0ydB0cKuxqiL6hs7rCwLnp4E2XCgrlZO5meUg6n0FP1jG6NFvR XzDTIoNkBqPiCfJNq1r7qtbLx6BNt/Iw9E4fq4xNBtf2Q0x9KkBJ8f2I16s96na24vHxFiqzs5 WWO9h2zd90k4wGv+FnfYe7c7gyAPgXZKapdANfgmb29frQ==; 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-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=By6QN3ZkuEtCnZ90ExauKyh8KmzP6eIV+bNxy5h7pbg=; b=j8Qx3FNkJmPKhFlF/G1OPLFH/b +JziwdXoxRWbGaqA+vN5gmW2ZeKvakxW8KV1Ejfzx7ZWmVnZ2AOctE/ZGSbVj80trGmulo+26I3qu ilZ3Dt31OqaNtpdf8BFESzjoUzB11RElxK5+WI8G+CCdCVESZ8yabUXuuFXfGHgbyV5nZXhSfqU/Q nh7YjPkY676hH8n6MDp2YbIjCvlQT/D1uVc4LEZXtRi/7N3BRWrLfAW5ZFN81hJO1eLosX+5kaor5 kRF1yEyEFUB16QLMSEuJWtLO1DfXDbljn8efqiL7U+cEPZ9amPgJas21qX43EsRpaixziwqrB6u9D c7XAyp+w==; Received: from authenticated user by zero.zsh.org with local id 1nWecp-000A28-HZ; Tue, 22 Mar 2022 13:32:39 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:36596) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nWecZ-0009i7-4w; Tue, 22 Mar 2022 13:32:23 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.95) (envelope-from ) id 1nWecY-004L9K-Oa; Tue, 22 Mar 2022 14:32:22 +0100 Date: Tue, 22 Mar 2022 14:32:22 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: completion for "info -f" does not work Message-ID: <20220322133222.GB708813@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org References: <20220315171305.GB617047@zira.vinc17.org> <65163150.28923.1647367522118@mail2.virginmedia.com> <2C495A59-EBA8-4C23-B0BB-964C4F0FEA40@kba.biglobe.ne.jp> <20220318135953.GA35304@zira.vinc17.org> <20220318140908.GB35304@zira.vinc17.org> <420E9029-D5DB-4621-80E2-3BF7A86997B0@kba.biglobe.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <420E9029-D5DB-4621-80E2-3BF7A86997B0@kba.biglobe.ne.jp> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.1+12 (1ba319cf) vl-138565 (2022-03-05) X-Seq: 49878 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: On 2022-03-22 18:46:13 +0900, Jun T wrote: > > zira% touch for-test-only.info > > zira% info -f for-test-only > > info: for-test-only: No such file or directory > > I can't reproduce this. Which version of info are you using? info (GNU texinfo) 6.8 from the info 6.8-4+b1 Debian package (Debian/unstable). But I've just found that this is due to my INFOPATH environment variable, which is set to "$HOME/share/info". See below. > info command has an (undocumented) option -x for setting the > debug level. > > % info -x 1 -f for-test-only # use -x 2 for more verbose output > info: looking for file "for-test-only" > info: looking for file for-test-only in /usr/share/info > info: looking for file for-test-only in /home/takimoto/.local/share/info > info: looking for file for-test-only in . > info: found file ./for-test-only.info cventin% info -x 1 -f for-test-only info: looking for file "for-test-only" info: looking for file for-test-only in /home/vlefevre/share/info info: looking for file for-test-only in /usr/share/info info: for-test-only: No such file or directory cventin% unset INFOPATH cventin% info -x 1 -f for-test-only info: looking for file "for-test-only" info: looking for file for-test-only in /usr/share/info info: looking for file for-test-only in /home/vlefevre/share/info info: looking for file for-test-only in . info: found file ./for-test-only.info This actually behaves as documented: Directories specified in the environment variable 'INFOPATH' are added to the directories specified with '--directory', if any. The value of 'INFOPATH' is a list of directories usually separated by a colon; on MS-DOS/MS-Windows systems, the semicolon is used. If the value of 'INFOPATH' ends with a colon (or semicolon on MS-DOS/MS-Windows), the initial list of directories is constructed by appending the build-time default to the value of 'INFOPATH'. If you do not define 'INFOPATH', Info uses a default path defined when Info was built as the initial list of directories. Regardless of whether 'INFOPATH' is defined, the default documentation directory defined when Info was built is added to the search path. If you do not want this directory to be included, set the 'infopath-no-defaults' variable to 'On' (*note infopath-no-defaults::). (BTW, I'm wondering whether there could be a security issue with "." in the default info path.) > PS > I've surprised that 'info for-test-only' (without -f) also gives the > same result. So I wonder what is the difference between 'info foo ...' > and 'info -f foo ...' ? It seems that without "-f", info first looks for menu items and converts the argument to a filename prefix as with -f: Example: cventin% info -x 1 -f ls info: looking for file "ls" info: looking for file ls in /home/vlefevre/share/info info: looking for file ls in /usr/share/info info: ls: No such file or directory cventin% info -x 1 ls info: found file /home/vlefevre/share/info/dir info: found file /usr/share/info/dir info: looking for file "coreutils" info: looking for file coreutils in /home/vlefevre/share/info info: looking for file coreutils in /usr/share/info info: found file /usr/share/info/coreutils.info.gz Here, the error message is different: cventin% info -x 1 -f does-not-exist info: looking for file "does-not-exist" info: looking for file does-not-exist in /home/vlefevre/share/info info: looking for file does-not-exist in /usr/share/info info: does-not-exist: No such file or directory cventin% info -x 1 does-not-exist info: found file /home/vlefevre/share/info/dir info: found file /usr/share/info/dir info: looking for file "does-not-exist" info: looking for file does-not-exist in /home/vlefevre/share/info info: looking for file does-not-exist in /usr/share/info info: No menu item 'does-not-exist' in node '(dir)Top' -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)