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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12707 invoked from network); 31 Mar 2021 12:31:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Mar 2021 12:31:57 -0000 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:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=th8BvzINED064YXYV73aAlQbbOOuu7sOqtwuyTKxS+E=; b=c3sI7KXIiic1WqocyKuinibinD lQQkPjZCNxYR1esHwSj9P0uYfx2X/sQCNPsKz0y3ie8O4F+vBgo5y1HpjSDBe8GE1WLGD9ZSRcSGH ddDOKWWNU8MJaqGOJLOtDSv9tVVoWkHSpKQlQ1bGAluFtnWZawfmUo+64zPi6kGbQGPi6tueztMD/ h7Zo6NbFW5uBVsO9qZv84ygvQ94BLkGlKoWrWA8SwWRnqOUUbbuDaG3va8XLn59m6Yeis/gBTqRTg +j5X4sQ3jpK5/8mlksHOT7O6X50iTMt9wMcH4gj2i93HT5LF/Ni10KGhnXEPST+Z15CwA6hmO3q/O cp5AeQcg==; Received: from authenticated user by zero.zsh.org with local id 1lRa0l-000MCq-Ie; Wed, 31 Mar 2021 12:31:51 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lRa0T-000M35-Lw; Wed, 31 Mar 2021 12:31:33 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1lRa0Q-000Eow-6F; Wed, 31 Mar 2021 14:31:32 +0200 cc: zsh-workers@zsh.org In-reply-to: From: Oliver Kiddle References: <476D5028-52A7-4850-98E7-95ADFA69367A@gmail.com> To: "Jun. T" Subject: Re: Improvements to the gcc completion script MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <56972.1617193890.1@hydra> Date: Wed, 31 Mar 2021 14:31:30 +0200 Message-ID: <56973-1617193890.190979@qzz3.XNO_.UryG> X-Seq: 48351 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: On 23 Mar, "Jun. T" wrote: > Does anyone know a way to prevent '--' from being split in 'partial word completion'? It is possible if you check for a -- in $PREFIX and don't add the other matches when it is found. That might subvert approximate completion, however. It ought to be possible with matching control. It is likely more useful to note the limitation in the BUGS file than to try some hack for gcc completion. Mostly, it is rare to have long options starting with both -- and -. The || forms seem hopeful at first sight because we want to map the gap to the left of a - but to the right of anything to *. But the ranchor only needs to match the trial completion string so that doesn't work. I think the || forms were added in an attempt to handle CamelCase but they don't entirely work for that. 'l:[^-]||-=*' seems to be able to add extra characters whether there is no - in either the candidate or on the command-line. That can't be right. 'r:[^-]|-=* r:|=*' is also close but the character matching [^-] is not treated as an anchor so it can be mapped to anything. Was this the only outstanding issue for the contributed _gcc update? What's the status otherwise? I've briefly looked at the changes and it looks good to me. It does add a commented out line that assigns args2 without the file glob. That serves no useful purpose, was probably debug that got left in and should be stripped. Oliver