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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29886 invoked from network); 9 Oct 2021 22:41:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Oct 2021 22:41:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1633819263; b=p2F6XESZW4ixVIDh5lqRg90W6PoR4s0vyILbtaiuxybaEZsK09IEl4FJd9Ei5kUU57/dvYLArj 8TNy2cr+PZKtv0jvUIPMgAoGK4pKEHxtsDuLknkrM89V0mqkkQiRk91f7jU8x9IylU5RaAIBao ht60ZvNo7q3yRSRlGTmIbqxKtherGowMCzScEB6PlT5oWP9y+LhHR0GxuYJhj8KzrhxZPxqvlO iToINUkAygTwYqMpFqk2V1X3XN6AaHsUiukMXYHqz7/jdGhXch+xST4LnNs8EUPttZfz9hQjtv e/lUOm0G52zVUh3xBfiKSxSp0Msn4oEsUiFng/I4E4HOEA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1633819263; bh=RVyIgoyxteNdNOu2qqAGqjS43AS+6OhMY/yavYQE6WE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=A+rNjLLd3j7lCDXGLZhkW0WvtlEbYenacG12nEJdUNfHhqoGBHzJewEqQ1J95Z4k/5C8ij3Ozn Pu/ikQHd+k6Gk1IqbmcGBmIYFCwqMMxSLHRqcApJyr3LpIKjViQNV39U6Up+SoOOKg+xd0DWFb X4ojhIEpEguQFJKPbd3Ext+kWo9MXaS+ho8/SOiAL3/dZdqzW4d2e7Uy/NUXr6lRc6BVnN0DtV FCdhnCT7twodnN4cw+zv92b2SdUtA3PYU3G5FfR0zPEtaI4CmyfhcpA5DpT7Nqvxs2paUkGmTe 3XGwhmcHCNTqdXcJR6Y3n7Qp/all0HUrrKp08qZCN/qpFQ==; 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:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ey0hSu8KclWS6m/EZnCIq73KoYTGeuuBs2aqx0d9W10=; b=lJLAmAws4I8jbavjm5qNyvJTJW 5wXtRCotsAn+N8p6buHNdMcd5LB+efIYrY6w/90Y37XhqOka8ILegb3cxVypEWD1R6gIXEBzo3+Zk 2+RT/lLJUlIhkKhPPPJsmkdF6vtHsgtNSjddrDlsNLrItvmn1zzFkDrIwwGmMHf45fsNI4SNdXW9S AvcHi0cnbg0NoMbRkR0hYVc9C6f+KxIlf/qCitHMNx33EmHHQ7gtgQe51bWbwf2M47gzezagWUeOc YdtNidYu8A4oD4Y5iUljMUoXuMnCsrHSm+d8TRfH/bLP41yYLrX5/JxZrMVzbSi3aj9gptA8uI9zB XVqFFqCA==; Received: from authenticated user by zero.zsh.org with local id 1mZL1b-0007IX-Dr; Sat, 09 Oct 2021 22:41:03 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f175.google.com ([209.85.219.175]:35669) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mZL0k-0006Zd-4V; Sat, 09 Oct 2021 22:40:10 +0000 Received: by mail-yb1-f175.google.com with SMTP id z5so29455568ybj.2 for ; Sat, 09 Oct 2021 15:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ey0hSu8KclWS6m/EZnCIq73KoYTGeuuBs2aqx0d9W10=; b=7qjiAmBHvMEpr7zIWaoF2B2aGks4Mu0a509KuZtIFyjJyaltCFA5+0Pmb69iVaKLoq fTgO5BbG3trlYt1Yy9R8S8OSuKeTtaIjUC4y0Z+N59w/JZeC2wNhjHUS0tfYb+D7AbHN +U3pbMiYRO7NpS1mQ+BoUzAVbVx46iBHP3rKuMvdMOk3vckSjalOcZi/woYKN/ksvO84 6PjcONfciNqKXa4xp6UhpbDUrn1eKpSQ7FRwBlLO/TZvmdKXfHIXbZJSDgYrCYrLj6zJ TUEF2dT0k9ACSnz3AxaXTfV+BHxf+zfa3MNZ9e/fK3BtfQcacvAZvGJQ6L2WlPRdG5h3 SJmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ey0hSu8KclWS6m/EZnCIq73KoYTGeuuBs2aqx0d9W10=; b=OIaMsvGls4D7eCdKRQ6iAnAaxS2CjUf5L6ojKSr0ZsTMhgvJzoxfDy9DYqcob99eZa Ho2d8rFGVqIte1vTRNR/TBUno5E/6S4GVFjUoFQxqCnulboXuyJXWRa/Nl4ii6elLsgF Y7DgvvYWxc0sYYwSC1SqCVdjFsJFuqIOi+E3DpPTGsW2Ko+k0IVB7JbstZt2CUvFil3w dy1UQzwPwecECW2EoSPAWkwjDP0agD8jdXLiblVg1yBhvS0cISuRt/ZnmJbli6jGayxN /R5HcdgmEn8jf2Po2et30tN5FWF73LWAWBFjrOXYZcZVGxZ91BGBTx+sVo9JYXVoynxX VK3g== X-Gm-Message-State: AOAM530xXDkZb/ShgvryXUWda0c2Gvq7oLEt4SVGyqhRdhuu0O42jV+9 IbUZs91oXVqOrtTTZCuSoeqReJWCvJDAAEC7U3EwG/IngwQ= X-Google-Smtp-Source: ABdhPJwvDjKK6xE/rpuz6i9TBeaH+UmnmOWkB0IUx/ew0EdMcxXi3O+sf1uLJbyNPloa1PyGlVbklW4BSr+EFXKpMfs= X-Received: by 2002:a25:6504:: with SMTP id z4mr12148781ybb.365.1633819209083; Sat, 09 Oct 2021 15:40:09 -0700 (PDT) MIME-Version: 1.0 References: <20296-1632661753.678317@ipjb.25sX.Whnd> In-Reply-To: From: Bart Schaefer Date: Sat, 9 Oct 2021 15:39:58 -0700 Message-ID: Subject: Re: Questions about completion matchers To: Marlon Richert Cc: Oliver Kiddle , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27225 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Sat, Oct 9, 2021 at 3:12 PM Marlon Richert wrote: > > On Sat, Oct 9, 2021 at 7:23 PM Bart Schaefer wrote: > > > > * l:|$lpat=$tpat -> [[ $trial = *${~lpat}* ]] && > > ${word/#$~lpat/$~tpat} > > Perhaps I'm mistaken, but aren't you mixing up $lpat and $lanchor > here? Well, sort of, yes. See Oliver's more recent message. A better description of what's happening is that the matcher transforms the word from the command line into a pattern, and then that pattern is compared to every one of the trial candidates, and then pieces of the trial candidates are extracted and merged with the word from the command line to generate the list of possible replacements for that word. It's never as simple as a string substitution on the word itself taken directly from the patterns in the matcher. > How about changing the docs to just literally state the transformation > that each matcher applies? Because it's not a literal transformation. Matchers don't transform, they create a comparison between the command line and the compadd strings and define which parts of the command line can be replaced by what parts of the compadd strings when that comparison finds a match.