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 f75cbdd4 for ; Mon, 13 Jan 2020 21:05:41 +0000 (UTC) Received: (qmail 1051 invoked by alias); 13 Jan 2020 17:53:59 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24658 Received: (qmail 7275 invoked by uid 1010); 13 Jan 2020 17:53:59 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f43.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25691. spamassassin: 3.4.2. Clear:RC:0(209.85.167.43):SA:0(-1.9/5.0):. Processed in 1.934334 secs); 13 Jan 2020 17:53:59 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.43 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=PNwCJALw6FMZ2ejVQZqu6yIiCac4VC2Q3N2Dq+QKvJo=; b=KU+NR45bXLDosc/wDs5+Ypr9BjbygsdAPFG5frrKyj/ZKLrZNLnNemsa/g3M2WoZwc E7oqG2wh1rjOm20y0dFpl9i2g1p+00VUaTMmoq3SrjAdjKH4Z0UgzR86EzRLBcY7OLoC gxDclgZn4gBXuAZBnL8gv2t6g8f6rwWyl8ToaNHK0U7L1OoLd6J6s/RnYPHRM0MKrttZ mEw0u33BlbPf2gOLPAOZ7Tn48b1RTWtS1RCXtI33BfcTUlk2NVa8l2H0bEMDs99bXC1y gYchZmPRHZjozKMF0IzAAgGGnbB3Vct4mSxYOGU1kSsCAktZdpms9PQUw7lsBiUkYeFG pThA== X-Gm-Message-State: APjAAAUXTlhV0Dy54Cd8qDI4nBZRcsK9Jer3EK6/98ovtjzT4yFwVJ4Z cOj0KDc8gPFkcEY4pR+BDYl8uUNS3kyAs6EmwBjlt/7MKnY5kA== X-Google-Smtp-Source: APXvYqx463af2aYYWe43Pr7/FKUDupu1koy2OMxugjFuuD43o4HVXK/6JCGR+pWo3EcQ7PbNVRouHrqj48YoGygFuD8= X-Received: by 2002:ac2:4a89:: with SMTP id l9mr10731780lfp.121.1578938002444; Mon, 13 Jan 2020 09:53:22 -0800 (PST) MIME-Version: 1.0 References: <1578934576.7311.13.camel@samsung.com> In-Reply-To: <1578934576.7311.13.camel@samsung.com> From: Bart Schaefer Date: Mon, 13 Jan 2020 09:53:10 -0800 Message-ID: Subject: Re: problem with context specification To: Zsh Users Content-Type: text/plain; charset="UTF-8" On Mon, Jan 13, 2020 at 8:57 AM Peter Stephenson wrote: > > I've a feeling matcher-list is only run in a very general context, so > updating per command doesn't work, and you need to use the matcher style > for more specific cases. Yes, that's exactly it. matcher-list is an oddball that gets queried before the individual completers are called, so it never has the fully-formed context string. It populates the default _matchers array at the top level of _main_complete, which is then overridden by the matcher style when _descriptions is called after the context is filled out. The documentation comes at this sort of sideways; under matcher-list we find: It is possible to create match specifications valid for particu- lar completers by using the third field of the context. This applies only to completers that override the global matcher-list, which as of this writing includes only _prefix and _ignored.