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 25355 invoked from network); 24 Dec 2021 19:59:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Dec 2021 19:59:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1640375960; b=SnNt/3PRaCb/PPG7E0Ie35msHp9xChQGCaqmACCf1fBIPAeROuJO/0bfcnW0iIR+Wy0Tp58g+z 31/Cbp2a40giI0H8qZvv3WCtBk0CIUiyCBGJi14oyWDiEapjlCdvW3UQSbTJW4xvAKVkZikSVI b4hK1xkOBp88zzHBS/QFzboSt6lLcHQyNwZkM1Y0Kxwnyy+YPOJXUXmSB2Zg6l2WyI1j6U8Y/o tmFrzutKcxjm+lNw+HdGNskAKJ91vxuTLvswnLEF2B6i/eYR5cSm/JHhoEq/2kX7R2plOpEQgd HGAg476P0xVpnmNIKqozhUHbEAZSO2raSjRE5nA1/bGSBw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f171.google.com) smtp.remote-ip=209.85.219.171; 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=1640375960; bh=2WYCTuVDNa2wXwY3KIe5DG7yJqmiYU6ExDUqcDieGYA=; 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=Dmn9S0nnufSs8QomshXy3UjHvPyexnEfLA3Db0ugW285GW4zi8XKW+eUw085AObXY8vEytfNMw /VFeauy0AodCXyu285tq5IzSX0NyG0I9vQD43ttKQpWXX3ytImzCOUZKgVQZGygUwwove292ov dM9vRTACrAdY4ga6qE8A1+ts+W38RvP/vYkhBzIFuXyW8ez9FrrHl1+cVCN5g54NJl6+rQ7H1t mDilX4CBi4/cAMuevz019oNBZYf72ePRGm+O3pG77mYizbFzCFOz0SdI9FVzOgQIVWyINc0avM 3ZaSCYT05J2i7KNplzqI/qOEXBwym5Vxn5WVQaXPmkqgUw==; 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=1uT4lhyPXuKOaUEFZiFewcpEKTS/x6eI4JPU0rzBltg=; b=h1g+IPKlvrwSOnjZyAzORFkzkl nCsmpndLqB8Hqsf4jfKwjJfCb69JLi/mM/bs6Ee99oc00L9W9L8Db6Q2ZJ5O+pOh35AdMbuEVSgGg zANX7eLpE9Di/5tFXThXHQ5JRFLC8xDLiph05vFNOCMCde6iczRYEOIsBRwEExxb1wZbAznj3v8Wl DpjO6RU0j9rAgFd0D9grCeTuZWoIpPOD5dQvh6ZhcR0sEAOvyDBorhGI+y+YIt9VzL3xcE2E2t5lh UJ357DBRWxz4YDH3fTP2oGJ1TUrYXw2YhxWQbA3JMSKXecx5tFfcmD7ePEB/ux5ZvqYd2PnsPSek1 AObEGOTg==; Received: from authenticated user by zero.zsh.org with local id 1n0qik-000Puh-Bs; Fri, 24 Dec 2021 19:59:18 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f171.google.com) smtp.remote-ip=209.85.219.171; 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-f171.google.com ([209.85.219.171]:44971) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1n0qiQ-000PdE-7f; Fri, 24 Dec 2021 19:58:59 +0000 Received: by mail-yb1-f171.google.com with SMTP id i3so11260941ybh.11 for ; Fri, 24 Dec 2021 11:58:57 -0800 (PST) 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=1uT4lhyPXuKOaUEFZiFewcpEKTS/x6eI4JPU0rzBltg=; b=Zj/hq8vpWATiqyf8QlJYjIZDvN5VxkV7JBGbwxcvpqLBIOeQQv1kbwjRBUqUdKwRJh rwNMpC+mTpxljvDz0p4cP8jYYtHajkmQchjwv24aovKvDVYdk5r6nq3r09q4vbvk9M06 ibpCREcMkVswut/kzFs9gBD7ZeoohKagvyprqH59/PmfuKhtAk4RVm7IdiMyu1qFjotR g9/PoS26+S7oCJGdhdu2abcHCyy1tjFj+ARZpe/h1ZTCP8NX6HC+NS7Kj91ygNpmHBXX 0BEz6FRDJvLTVyDdO5pboGLVGmY0WjgYFg1oTinfcAFTUH4zApVAXaDU+/7XgsN5hQp8 RzXQ== 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=1uT4lhyPXuKOaUEFZiFewcpEKTS/x6eI4JPU0rzBltg=; b=Cqv9DUC/RwiZ6uyqrH7RzOWJNCJqqgx/uxHKpjfR/UOOuuTOwwnMs+2uU/ps/VwuiY 9275ZogkWwwwUzEIJE3CtH0L3XgVAcCd9s8RB1aJMo5z4S87sjmy0UtRArfZJmXqdn8P c9e/ecNIDV0Q1YU0KgR1KUY21+WznmxJjfK/z87res9nTt6snxwPE7BlC8ThOkiw0XS8 XU/C7C5CVPUCZoNng9rGsVM+KbP0b71ZEZcG1qm8RJkYiOSKHhG/vbDS+tklQBNt+QF/ 527uzM4DDfzyF0WNyj7SfAiuu+TOJfZW1wLhzgFfttbuCsrcGdahBboQAUPyOuAPimgc dvAA== X-Gm-Message-State: AOAM533qmA3v83VqiGQuDbMN7DX5B8xYJ5zKzQrgAHhROq4ykFSUOg9a 6cXY4oM5T6h12mv1cn15m0wNUD6+eYSPm8/5c8mEVg== X-Google-Smtp-Source: ABdhPJzIIh3KonQFhRsEtj4/jFK624eJmiSPdV7v2KUYVktz0pTuLE11ymRuiKa/TX6Y6VT207eyXDnG/P55JlSGpIo= X-Received: by 2002:a25:6f09:: with SMTP id k9mr7007405ybc.143.1640375936731; Fri, 24 Dec 2021 11:58:56 -0800 (PST) MIME-Version: 1.0 References: <1457908574-11020-1-git-send-email-m0viefreak.cm@googlemail.com> In-Reply-To: From: Bart Schaefer Date: Fri, 24 Dec 2021 11:58:45 -0800 Message-ID: Subject: Re: [PATCH] completion: matcher correspondence classes: fix offset To: Mikael Magnusson Cc: m0viefreak , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 49665 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: On Thu, Dec 23, 2021 at 12:25 PM Mikael Magnusson wrote: > > Were there ever any follwoups to this? I don't recall seeing any. Probably the only thing desirable beyond that patch would be a regression test. In the original message: > > a) Why does "cfp_matcher_range" do nothing if more than > > one matcher spec is given? It's not that it does nothing, it's that it never gets called by cfp_matcher_pats() when there is a matcher-list style but not a matcher style. I haven't worked through exactly why THAT happens, but it has to do with whether there's anything left over after the loop in cfp_matcher_pats(). I have noticed that the "compadd -D" pass behaves the same way regardless of the styles: cfp_matcher_pats() loops through the matcher spec and ends up with nothing left at the end, so cfp_matcher_range() is not called. > > b) Do we even need the "cfp_matcher_range" function > > at all? Seems like the later compadd -D works Although _path_files is the only function that currently calls compfiles -p, that doesn't mean no other function ever might ... so what would happen if the compadd -D were never done? > > c) Why does _path_files duplicate all matcher-list > > entries when calling "compfiles -p"? It doesn't appear to duplicate matcher-list entries ... what it does is build its own list of matchers from its -M option, the "expl" value returned by _description, and the setting of nocaseglob, and then appends that to the matcher-list passed down from _main_complete. That may or may not duplicate parts of the matcher-list. I suppose _path_files could scan the $_matcher global to be sure it doesn't append something that is already there ...?