From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 350d86c5 for ; Sun, 22 Dec 2019 04:32:22 +0000 (UTC) Received: (qmail 11665 invoked by alias); 22 Dec 2019 04:32:15 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45129 Received: (qmail 4861 invoked by uid 1010); 22 Dec 2019 04:32:15 -0000 X-Qmail-Scanner-Diagnostics: from wout3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(64.147.123.19):SA:0(-2.6/5.0):. Processed in 4.820296 secs); 22 Dec 2019 04:32:15 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdduiedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjfgesthdttddttdervdenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cukfhppeejledrudektddrheejrdduudelnecurfgrrhgrmhepmhgrihhlfhhrohhmpegu rdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgenucevlhhushhtvghrufhiiigvpe dt X-ME-Proxy: Date: Sun, 22 Dec 2019 04:31:31 +0000 From: Daniel Shahaf To: Oliver Kiddle Cc: Zsh workers Subject: Re: PATCH: following -C option in make completion Message-ID: <20191222043131.sosy5gg5aevuu765@tarpaulin.shahaf.local2> References: <2024-1573077069.922525.ref@CD2K.zG8N.q383> <2024-1573077069.922525@CD2K.zG8N.q383> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024-1573077069.922525@CD2K.zG8N.q383> User-Agent: NeoMutt/20170113 (1.7.2) Good morning Oliver, Oliver Kiddle wrote on Wed, Nov 06, 2019 at 22:51:09 +0100: > In the make completion, there's some very old logic for picking out the > argument to -C. _arguments makes this rather easier if we just look in > $opt_args and has the advantage that we can handle -Cdir and --directory > forms (not just -C dir). > > This patch also uses the computed $basedir value for our view of the GNU > make $(CURDIR) macro so it will handle include files referenced relative > to $(CURDIR). > > Previously $basedir was forced into absolute form which I don't think > gains us anything - _files -W doesn't care. Neither does finding files > to include. But perhaps this breaks things for some form or another. > > I'm also not sure what the (q) modifier achieved. I've used > ${(Q)~opt_args... so it'll expand usernames and remove a level of > quoting. opt_args also does some extra quoting for colons which could > also be removed. We could do with some sort of safe-eval for where > completion functions make use of bits of the command line - expanding > variables and named directories is useful but command-substitutions not > so. I've ran into a regression, and reverting this patch fixes it. Using current master, and the following setup: % cd "$(mktemp -d)" % mkdir foo The following two work: % make -C [offers foo] % make -C ./fo [expands to ./foo] But the following does not: % make -C fo [no matches] It does work if I revert this patch. WDYT? Cheers, Daniel