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 2969 invoked from network); 18 Mar 2022 14:00:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Mar 2022 14:00:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1647612030; b=aSYlI+gTZo03ps7ZO0LyY6czJMfnsU602dsE54AwP4gs3YYSP2j9Pk6AljKX5QvFM8nG5ZqowB E+nw6m+kOvBesAXVRBikrpyqMNmJzTvL+bW3xr9T8jYZ4+oNoeO6E81HOKr22d9dj7+aR+LlUV QIlD27xX3d2wwJ77B/dFPfHC+MFc7qmtw6xF+jg3old8BtzGhGb+8a7kFxlaQtv00oIG49pCGk 2vRVF43HwygDYlzJGQfRrSwoywVg+gr8JAJGJZO/qkpHCL6frzVNDgJsWB+jFkE5EzTKeyOXqc 6AE4tadYO8x95Vox6K6mprmWqD761g+GK/j6vU4QGOMxkg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; 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=1647612030; bh=xMu1mPaYRsURPIqDR2fujK1en8PDoOyMKnA0jVhVKys=; 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=UbDnBMU2Z+xqYzqTEmL+CRXNWmA//ezPfO+FtzkcWk+mbFwX973ofPsWiMgCisT2teBoRK2N0X dORKtaFGCNVl6vG6T2CPoGkD9Dmq9e01+V5zqR+xzOZACpX9s/wKeVFB7agYBVJYeuGtGf0NPw ZtYkl1dRTCZ4N4fmHnal7lbt5LlCFDHB2tbSS3kjs3GKf5bC07f7F2EGMSWXx8lkRj3XYNv1XG cV9nHQqldrwEByyBJqRoG96J1PHAadJi+adEQdXo9MlCmpLkqWtbuRcjIqtI1uITRwW2d9m7+c O3r3EdyPDUIUhwUe1w/dpOyN3Woa9ywszw0H+G7jFk5Vyw==; 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=GVWXQuNyRizIypzcEH2Kjg8tmBex0zAXNQUzvh8kPXk=; b=LMuN3kWOVGMLDZLIZYwIyCCNWo /JwPRoW5sCf1YPRftNGao9PYaCtg0LwWu6/HNAU1DbEpX2sZgEwmCnm5qlO/wn8p4tMB5dpyjLQFG ll+e3pZAwD8VNj3jSAUi6fYI1M6I/WmYu+LiDKLjJ+FtjKb+MLoqxf+MvSOPUSwSf3NEqXWglt46h MTc7efJROlkXFM47ndEB7WM3jj94QIa9sJfXm/+O7z58FDSIsIcQ3v7se5xhAyzCHY+CiHjy0gE0D 4/1/oPSvOsuV1hhFTvSufG2c+lx+l/YLxqIfcdAo9sozdKF+wvkIn+1U27DbMA3jWL6oay+GC5tt4 CfVkHSug==; Received: from authenticated user by zero.zsh.org with local id 1nVD9a-000GMh-1W; Fri, 18 Mar 2022 14:00:30 +0000 Authentication-Results: zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none Received: from joooj.vinc17.net ([155.133.131.76]:60722) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nVD90-000G1P-Kz; Fri, 18 Mar 2022 13:59:55 +0000 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id 71F184C2; Fri, 18 Mar 2022 14:59:53 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id 3FAD028002F6; Fri, 18 Mar 2022 14:59:53 +0100 (CET) Date: Fri, 18 Mar 2022 14:59:53 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: completion for "info -f" does not work Message-ID: <20220318135953.GA35304@zira.vinc17.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2C495A59-EBA8-4C23-B0BB-964C4F0FEA40@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: 49867 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-16 17:46:28 +0900, Jun T wrote: > 'info -f' accept any (relative or absolute) pathnames. Well, not exactly. It seems that the rule for "info -f" is that if the argument does not have a slash, then the usual info path is used (with no fallback if nothing is found, i.e. an existing pathname in the current directory will be ignored), otherwise the argument is regarded as a pathname. However, a set of suffixes are tried: zira% strace info -f /blah |& grep /blah execve("/usr/bin/info", ["info", "-f", "/blah"], 0x7ffe463ed830 /* 135 vars */) = 0 newfstatat(AT_FDCWD, "/blah.info", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.gz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.lz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.xz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.bz2", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.lzma", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.Z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.info.Y", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.gz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.lz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.xz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.bz2", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.lzma", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.Z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah-info.Y", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.gz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.lz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.xz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.bz2", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.lzma", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.Z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah/index.Y", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.gz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.lz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.xz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.bz2", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.lzma", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.Z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.inf.Y", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.gz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.lz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.xz", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.bz2", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.lzma", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.Z", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/blah.Y", 0x7ffe9d145a20, 0) = -1 ENOENT (No such file or directory) write(2, "/blah: No such file or directory", 32/blah: No such file or directory) = 32 Note: The ".inf" ones are probably for the MS-DOS filenames. They are probably never seen under Unix, at least nowadays. So, if there is a file /path/to/foo.info (possibly with an extension corresponding to compression), then the completion should work as follows: /path/to/f[Tab] gives /path/to/foo and /path/to/foo.[Tab] gives /path/to/foo.info (info supports both /path/to/foo and /path/to/foo.info, the former form being preferred). -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)