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=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22817 invoked from network); 22 Mar 2021 15:19:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Mar 2021 15:19:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616426356; b=M+0UUFoDyuNCfFT/1dFZE6OQ/hObHw50Alvz+HCxdwfGYHckhH/0BJrsdLF/UZ16NVonoN/QOH MA87pa8e0lNo6hhr1wqahCGSJ7vgaOIijO6pD9+r4LZbKakLqhbG28WlSUE0IzrenbYeOGObhX d/4dtGU7YSdiGhFR56oad9u9EzbKPNK64nAUehC9uxtkvZCeR/HHKX4Arefl/ZAXf/XnZ5mVdj yyN1xOPxcX/bhwE1XCl2GzDP/5KqmyjwCJkiZ8wwVe8H7qiRaIFWcuwSjNX2e4OP2A6SLGf65w u+/0if/z82z3FEuaFfq/NETL5hAv1lnnz7U+gx+p+vXuaA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.2; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1616426356; bh=uOQXp2rE0wZIHmMfDbDTGDHvK+nYFhXyVo6uFze4FhI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=kRU6E7DyEmvi0V3N5eOe8yt+ouoxn7GOecCGFDTK1Lbh1D1+txJhkrr+GDeI/8QRZ7rCzrfesg AiGfV7OAFi6ltgiyrs57RsONTParb8w0sG3UsBBDvjRDDhea9Fg0QXc8w2xunlkldfsno82SvN JVd2pjGwmSeQg62ShhY+cQPiPoe3CMxXLDuRyxDx5NN8LeEvlOASlhCdv7GYWYwEPJJcjItxam ckMB1XoON0ckK7BMTxTDnocUyy2QejsMIZMX8JhVleyRnEI/dLpvliUeII5U0xvSeySceaaGGw N16KKVv0/sTuZYGMtZjc9pPb8tZooAJM1BxP1UMG5VWejA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=uOQXp2rE0wZIHmMfDbDTGDHvK+nYFhXyVo6uFze4FhI=; b=EMVcvowZYEZAQTVHOJloCAjimy ieGdfdXM8STyYlaHROf1gNUPDupBNpLcfGANPeAOss30vd6Cy16guVG0yvGVLtIz+nOnB7t/+pVHB Z0bdHasQ9QiWoIQZHjxurqpsmJ6YdW8WaDlqOq5huZF1kSVtUXVLLVrovX6UaBWgNb5M9MhjOfJ3Z 3+Wui3n+WQEMM+uCvvUuWuQIknXm+mWiez6JbXB5M+Yh9lKOgWfzt/+tU6K2KBDQheWV/kAmGA0uw nxJcuRV7IxoRvy3fsOfvHlf7ergZpc+qYmQKqLH+57UknsFELkRWndjc4TXGEEGQJq4Ivr3m31hn0 hd4YY07g==; Received: from authenticated user by zero.zsh.org with local id 1lOMKh-000LFc-Iv; Mon, 22 Mar 2021 15:19:07 +0000 Authentication-Results: zsh.org; iprev=pass (snd00002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.2; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00002-bg.im.kddi.ne.jp ([27.86.113.2]:11905 helo=omta0004.biglobe.ne.jp) by zero.zsh.org with esmtp id 1lOMKM-000L6h-PN; Mon, 22 Mar 2021 15:18:49 +0000 Received: from mail.biglobe.ne.jp by omta0004.biglobe.ne.jp with ESMTP id <20210322151841058.COQE.45330.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Tue, 23 Mar 2021 00:18:41 +0900 From: "Jun. T" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: Improvements to the gcc completion script Date: Tue, 23 Mar 2021 00:18:40 +0900 References: <476D5028-52A7-4850-98E7-95ADFA69367A@gmail.com> To: zsh-workers@zsh.org In-Reply-To: <476D5028-52A7-4850-98E7-95ADFA69367A@gmail.com> Message-Id: X-Mailer: Apple Mail (2.3445.104.17) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 48223 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: Archived-At: Does anyone know a way to prevent '--' from being split in 'partial word = completion'? Suppose a cmd accept --baz and -foo-bar as options, and match-spec r:|-=3D* r:|=3D* is in use. Then 'cmd --b' will offer both options. Is it possible to complete -foo-bar for -f-b but only --baz for = 'cmd --b'? (this is ralted with [2] below; [1] is cosmetic) [1] > 2021/03/22 11:28, Jacob Gelbman wrote: >=20 >> On Mar 18, 2021, at 11:51 PM, Jun T = wrote: >>=20 >> I don't have any detailed knowledge of how Apple's command line tools = work, >> but probably it would better to use the output of 'xcrun = --show-sdk-path' instead of=20 >> /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk. >=20 > I would use use clang -Wl,-v but it could be a bit tricky to get it to = cache correctly, so I left that one be for now. On one of my Mac, in which Xcode.app is installed, 'xcrun = --show-sdk-path' gives = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel= oper/SDKs/MacOSX.sdk and not only Xcode but also clang invoked from the command line uses = this directory. [2] >>> I removed the matchspec "r:|[_-]=3D*" from the _arguments call = because there were certain options where I would try to complete them, = and they positioned the cursor elsewhere unexpectedly. for example, I = wrote "clang --opt" and after it completed up until --optimiz, it = positioned me on the second - when I expected to be at the end of the = fully completed option, --optimize=3D. also it didn't fully complete, it = left it at --optimiz. >>=20 >> I can't reproduce your problem. >> The matcher 'r:|[_-]=3D*' is quite useful and better not to be = removed since it allows >> gcc -fd-s-l >> to be completed to >> gcc -fdiagnostics-show-location=3D >>=20 >=20 > I miswrote how to reproduce it. You type --opti, not --opt, = then you'll see it position the cursor --optimiz. This sort of = thing is especially annoying if you bind tab to = expand-or-complete-prefix. But hitting a few more TABs will give you --optimize. It may be annoying for you, but I believe there are many users who are = accustomed to using 'partial word completion' and removing it is not a good idea. Match-spec 'r:|[_-][^-]=3D* r:|=3D*' may work better but not perfect.