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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29392 invoked from network); 23 Nov 2022 14:14:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Nov 2022 14:14:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1669212862; b=Xjq5zt7MOAAiijJncWm+rwWcBaC0lX2Pat0qduhSwn2tevSptLWSJ5nxPs6S8o1EX5WBsmMca9 0AhXCbI77X0zE1Bf5jZxKywoHU1dl7DhEIXPlDLVgA6LEHd9+zJm/rRDn7Pxac/axNl2gEZz9n l0LsQX1Zuj8fB42/wyWKDmiq+sEPdtqapBI4TE1ICmU7jlkqwekbOgFXndGs5z+xzbtUnsY/bR PhVEXaBbvLFYAYOwUT9PbOkCv3f7Q/gofWU0cYiQ1/urndMCinRaEOuMl+hQ7HA44Aj/uZm4tE 5gmOQQEhWgT9/tdEWa7Tnlnbe+iwUuq8C26qqmLFkaQVBA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout2-smtp.messagingengine.com) smtp.remote-ip=64.147.123.25; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1669212862; bh=LNR7kZm1oU5SfGJIswxTx3O7KJf7QdmNi0RL58dX1o4=; 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:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=czksMIyWVnHb8qS7rLwykghlGGBKhiy/zBDj8aP0L5svZbwoVCmokE589HS1bXp/ra1sOzY1oM VcDqHCAXaNKqk4aGW6+Bbc1hYyySFdBp3RWKuD1jAD+hmeveqwHKcUd88Kf4s2tYanOGw064Ms 1BL0LV+7qf208aHQMkP26WVsQvNd8+NUN6umRHjWzrP3LDDdYXT6sqoiYo1iJJwerN/Wb6ogJz a2UugWscZ0ZsTl4d+UP9PN1dNvFA1/0teb+Oqg3C+crkNcoFisFfC+z/z2uk8KgwLMxGYhFMd7 BdgAxTNi9yTRxWglT4XCbC0S3EwxpfAzjFJN96AqyzTYXQ==; 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:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=vkhrTp9Hj/uLcGUb6F8ZeGM0KsOVIr5n6JwlX1LXOq4=; b=qbeKQLBqhAU+ShzYQ/LbP04HoO LtSnJDGXSDR/7pR5SACLKahVIrZlCXB+bhxNOmsev6B2N/LONm5HOl4MM9O/C+EPXW2TWPPxPxyCJ I7lhlwlIH1CZZH4eKvuRelpq9QLy6Ii2COHiWZhi6XMRWohjnrVO6Z6k8CZgKqKhX4pjcKf0OO1fx iNlMiJVUMYvgmyo8mKhtHfi3ptivkbVJHe/myJvpYzo/qkQO9IVCQPY6j+JSuDAL1wEQZfNhSVS9o ZgyQLBaZMQDa1AFPOHZBhKrzIhSMpiRpOLFgFm8ZBcL52bxiF6wo3Ar1cjZS/bQ8pgf3JAUeP8fQZ phZNEaTQ==; Received: by zero.zsh.org with local id 1oxqW6-000Bv5-4b; Wed, 23 Nov 2022 14:14:22 +0000 Authentication-Results: zsh.org; iprev=pass (wout2-smtp.messagingengine.com) smtp.remote-ip=64.147.123.25; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:59865) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oxqVp-000BcQ-B3; Wed, 23 Nov 2022 14:14:06 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id E4023320051E; Wed, 23 Nov 2022 09:14:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 23 Nov 2022 09:14:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669212842; x=1669299242; bh=vkhrTp9Hj/ uLcGUb6F8ZeGM0KsOVIr5n6JwlX1LXOq4=; b=QLuSGt2OoGjJRhUCVKr5RLk2tT S1ykpZowhO38JHnDofZ2m2GWn9shHeJ/3VwI609vbMCotqkMhhz3E6PHqisN5Ncb R0ql6rApNjJgalNq4mgfSJ+fa6PR0oefBltsSg0mGQXA6BtkQ0KoeDxRuxj8rA1+ fkMLPAFv7Q7vHfP13lYMC9YjCP5zwlWT9M6Cjvw814U2uMyKhe0GLXMpgUjUQaeN pmty8PYpTt3XI2Wdp86yAyt/LEr5hMaNH0vLCRqKaYWKqhFtnwL30D677C26JEyS nBwwwsHB2cWN/ag2BAYETR9H6s7f/XEatipaCcxacC25e8XFMNxngdJM2mqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669212842; x= 1669299242; bh=vkhrTp9Hj/uLcGUb6F8ZeGM0KsOVIr5n6JwlX1LXOq4=; b=I gEoZtbxMZ2KysTyZHc0UniXQy4kW4Sf14pJZiWbmYq7HXKhrg/kAWLfExox3zS0b /AFLK+K7NZ16ObkorcNfOjKkjn3WkjQvoOHmENurRe2iu2SB+rBMEjAFap2OyVyg cM1KGiiX7CU8YIlrdQs98/LgOR5nH2fF2UyhB/4suvb1qqCFgSfDLXz8/f+Z1p3F Ojo0QEVXrvC5l2mQVIQMXqOGdSn9KOSda/X8sq0d9zSpmXgrCA8jhCQdTtrPRcTp BhJe2In85REtA+WCDxshfFvt3wbAzOONkDXt0zqryQBAX91MKaZw+ZHmfN2a4eDS lel71/e1PhZgyXlmqrNGQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedriedugdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjggfsehtkedttddtreejnecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeehtdefudelteejueefjeelgedvtedvtdehhfffjefggfeu heetheduueekuefhheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Nov 2022 09:14:00 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4NHNQs32tWz38Z; Wed, 23 Nov 2022 14:13:57 +0000 (UTC) Date: Wed, 23 Nov 2022 14:13:57 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: Thomas =?iso-8859-1?B?R2zk32xl?= Subject: Re: Path with spaces in _canonical_paths Message-ID: <20221123141357.GL27622@tarpaulin.shahaf.local2> References: <45820bd7-fab6-70f5-5abb-dc444f6f1075@coldfix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 51034 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: Bart Schaefer wrote on Mon, Nov 21, 2022 at 13:32:41 -0800: > On Mon, Nov 21, 2022 at 9:41 AM Thomas Gläßle wrote: > > > > + local -a tmp_buffer > > + compadd -A tmp_buffer "$__gopts[@]" -a files > > [...] > > + matches+=( "${(@)tmp_buffer/$canpref/$origpref}" ) > > else > > # ### Ideally, this codepath would do what the 'if' above does, > > # ### but telling compadd to pretend the "word on the command line" > > # ### is ${"the word on the command line"/$origpref/$canpref}. > > - matches+=(${${(M)files:#$canpref*}/$canpref/$origpref}) > > + matches+=(${${(M)tmp_buffer:#$canpref*}/$canpref/$origpref}) > > fi > > I'm not confident that's the right fix for other examples, given the > "Ideally" comment there. Daniel, you were the last editor of that > section of _canonical_paths but the change appears to have been > related to its use in _mount (where it is no longer used now). The change in question is workers/39070 (= zsh-5.2-406-gaa041f7a5). > Any comment? Not really. The log message and thread of that change describe what use-case that change was fixing: namely, «umount /f/b» → «umount /foo/bar». The comment quoted above concerns how the candidate completions are compared to the word on the command line. The comment says that, instead of applying s/foo/bar/ to the word on the command line and comparing the result against the raw candidate completions, the reverse is done — s/bar/foo/ is applied to the candidate completions and that's compared to the raw word on the command line — and implies that that's not exactly equivalent to the former, and that the former would be preferred over the latter. Adding or removing -Q or {(@)} (or ${(b)}, cf. workers/39080) might well be independent of that issue, though. HTH. Daniel P.S. Feel free to Cc me directly when there's a question to me specifically.