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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19203 invoked from network); 12 Sep 2022 09:01:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Sep 2022 09:01:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662973316; b=apYa62ql7vbHraL+TaPW+r6ZNNQxWYU10v3ui+OVAtqjXKYSTmWmlE9ze7Fjgy9bbuys3TWhia Cz8h82YXR4ZogAZ4aOvEzIRPHTwwm8cPCnmxA8OxPUj0W1kp6uUdc89ddmP+QpHECXYFsMEr+y bp1Sj7nMZ4MuxSgRPMXMrBcNSVIcMktGFfdzCcmtJ/uUoDgOpbhBea4wwU5g2GqSq4uMqvViMK qXcivhQumCD4/dWO8N7T4rDpAD3sCTgJaHT9rg1OWq+kYdFWR/RUKzO6j1UxnWxRtji4qrFB3/ 68RedTQOyk68fr3z6YttAxmSlBJbp/OWKncM3D/EhLE/Cg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662973316; bh=lAi78uYXC2KfaDELti3aEho7UYLF9KkixdnOi6wgj/k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=BVLJTmYiJ9ldSiIQw3ENRENYsmLysZkvXp5uTT8X5IAuhm98nxSvqCdDfiheP9pu/8u/1jaBYE URgOQco1ap5lR0AKJa/kE9bCB+oNBPISG4tV8OnuD356RbBy2F4/5WHegf7K4pOjyDu9bZR3RM uXbOVQn83JkNh88mwzjpmHkVbemGSLATllrECQTfDs+XWjtq6ox812dfrknvGJFDw4D5fbAHNs YsYReoUtyybPSWnSXleAxZRfZbFTMTpCkHL0qRaXhR/JswdIV4KEPt7HoUzlCxhv3hlJNFD37n BoO+15k2edIsNF7kbcJWfJDXFJvkZRYNVuI7kosMn7j0VQ==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=gmvqaJGgskhN0ns6cRlzAOR8+dEtmoS3RIWFBOCeSfU=; b=AbuwoTr1kkEbxOg9MqKcn3jBNE eDzi7qSjw6Jibn8PtYk8Qj34l8sm4sZNXsnOIbA4ZdpKwswWLlyN8F/Zks6bTdKUFEYDHzWl40D4Q CmgO6ok4v/pPvXZRt5JA582C/sPcHD7+nXUH0p55DYgG2oVR69IJIWhiX3RWCUeYFqCEhs/nJIVaB dJ2xk2AMSIz36EwnDK9qo9rKoOpzB29Omm6GND7kRnL3N7nMF6mMCy/u8xKQBXnPmYpgfO0wd1HeG 1BYgZU0ESp8Otwe4Cygt54qaYeXBXEhLjDo69TZvF4+XBoI/+jJ6ovbea6rTDZ8DNVWBzBFOLOsWD 88/WjKFA==; Received: from authenticated user by zero.zsh.org with local id 1oXfKF-0003aQ-CN; Mon, 12 Sep 2022 09:01:55 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:47229) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oXfIG-0002pj-5H; Mon, 12 Sep 2022 08:59:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1FEB65C014D; Mon, 12 Sep 2022 04:59:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 12 Sep 2022 04:59:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm1; t=1662973191; x=1663059591; bh=gmvqaJGgskhN0ns6cRlzAOR8+ dEtmoS3RIWFBOCeSfU=; b=XwzAu8XMHTStIYkIjD8iAljJ+y5YEVBelq3xg4s+8 LVnrEVwdJxS2KUjOdgKhUayoDv7+oMTlqxCfeBdQ3lM55jQ18BMM8j8mvlxFHA+L 7ZGNxgdUzDkTGdS5HhxR8xd3KwwQ790gnLqwEVFAVqjMlz2iHEJgxflJqDLDGXsn 0gdqnhAKw3y6NHt42MXHfBSORGSZ1ZFRFq7Knxce8uz1ol8yOKgY+eftDdDJt2sm s5JWKiQ8pV/D4P0XbTAdB0uUUDg3szHzodfOGwV3fckBOEgodjHOnpgM7Wt/cn84 nUFHZBDi2POo+5gkg4YC5LSCMQJztlKJlc0njJEQBpDdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1662973191; x=1663059591; bh=g mvqaJGgskhN0ns6cRlzAOR8+dEtmoS3RIWFBOCeSfU=; b=YnkURE28XGdZtNrS6 VNGzmjPoLgAyg79JBQjC1mfCc4y/RfwdzJQd+jkFCsbZBsTnrnN6nOKfmvDuuaew kGEXRdliYoNm7V/yyXIPTQhWYIu8dCKUMalr0r/eM2k2EW+g7f4E8qBhAVJX60Jb eJG+oUkvEpv0/UNLMhGnELuaBJVQ7eur0a+huqXQpQtl6NArD4AP0CO0iR+aHvqT KwZcKSRGCd42tasA393G1aDltTTTOz6oxfqdbMqHJlwqO0ErKPSlM/lyNczCv7Uw 2yN/0gbBIK5pWWrDVwbv0HCpLXGjJevP3B5ytFkZDwBzlVrMUaqVu4wKsJA+4nJQ CSIUA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeduvddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggugfgjfgesth ektddttderjeenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghn ihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepgfekgfefjefgvd dvgfdutdelleekvdefteeitdduhfevveevudfhvdevfeefvdeunecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshh grhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 12 Sep 2022 04:59:50 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4MR0sd0Dpkz1JJ; Mon, 12 Sep 2022 08:59:48 +0000 (UTC) Date: Mon, 12 Sep 2022 08:59:48 +0000 From: Daniel Shahaf To: zsh-users@zsh.org Subject: Re: Most minimal configuration challenge Message-ID: <20220912085948.GW5920@tarpaulin.shahaf.local2> References: <33d0bd1a-4da7-416d-a92a-04ceb07d1107@www.fastmail.com> <1c9b6072-26e7-467e-b8cc-7d44f15eaf1b@www.fastmail.com> <9116efd4-7c88-4ea3-9601-9c522236fee7@www.fastmail.com> <20220831092831.GA992100@zira.vinc17.org> <20220902092640.GJ5920@tarpaulin.shahaf.local2> <20220902144434.GG255755@cventin.lip.ens-lyon.fr> <20220904064224.GO5920@tarpaulin.shahaf.local2> <20220905094734.GC255763@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220905094734.GC255763@zira.vinc17.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 28063 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: Vincent Lefevre wrote on Mon, Sep 05, 2022 at 11:47:34 +0200: > On 2022-09-04 06:42:24 +0000, Daniel Shahaf wrote: > > Vincent Lefevre wrote on Fri, Sep 02, 2022 at 16:44:34 +0200: > > > For instance, "zstyle -L" gives in particular: > > > > > > zstyle :urlglobber url-local-schema ftp file > > > zstyle ':url-quote-magic:*' url-metas '*?[]^(|)~#{}=' > > > > > > but I can't find any explanation about why it should be ":urlglobber" > > > and not something else. The man page looks similar for urlglobber and > > > url-quote-magic, though they look different above. > > > > By convention, context patterns are of the form «:foo:…» where «foo» > > identifies a particular library / module / plugin for namespacing > > reasons. So, it says ":urlglobber" and not something else because > > that's what the author of urlglobber named urlglobber. > > This is still unclear. The zshcontrib(1) man page says: > > zstyle :bracketed-paste-magic paste-finish \ > quote-paste > zstyle :bracketed-paste-magic:finish quote-style \ > qqq > > But I don't see why ":bracketed-paste-magic" is used in the first line > instead of ":bracketed-paste-magic:*". The context pattern must match the lookup's context. The lookup of the paste-finish style in the bracketed-paste-magic plugin are under the context ":bracketed-paste-magic". The pattern ":bracketed-paste-magic:*" wouldn't match that context. > Moreover, I don't see where the context "finish" is described in the > man pages. The context element "finish" is specific to the quote-paste helper function. (That's perhaps not clear from the documentation.) The possible values of that style are indeed undocumented. Bart? > > > In the zshmodules(1) man page: > > > > > > For example, a fictional `weather' plugin might state in its > > > documentation that it looks up the preferred-precipitation style > > > under the `:weather:continent:day-of-the-week:phase-of-the-moon' > > > context. According to this, you might set the following in your > > > zshrc: > > > > > > zstyle ':weather:europe:*' preferred-precipitation rain > > > zstyle ':weather:*:Sunday:*' preferred-precipitation snow > > > > > > So I would expect the translator to mention "continent", > > > "day-of-the-week" and "phase-of-the-moon" in its output. > > > > The zstyle completion actually does this; try completing > > «zstyle :vcs_info:» or «zstyle :completion:». > > zstyle :vcs_info: > > just gives > > Completing `context pattern' or `vcs' > Here it says «vcs» and offers the various valid values (plus or minus quilt and hooks, but that's another story). Under «zsh -f» the various valid values aren't completed until vcs_info_printsys is callable. Running vcs_info once does the trick. Presumably _zstyle should «autoload vcs_info_printsys» before calling it. Could someone test this, please? (I'm ENOTIME.) > This is not very informative. This is different from the man page, > which says "vcs-string". > Again, I'm ENOTIME, but patches are welcome. > zstyle :bracketed-paste-magic: > > is even less informative: > > Completing `context pattern' > bracketed-paste-magic styles should /not/ be completed at this point. Styles used by the quote-paste helper function /should/ be completed at that point. So, the problem is just that _zstyle doesn't know about the styles used by that helper function. _zstyle could be taught about bracketed-paste-magic and quote-paste… … but it doesn't scale for _zstyle to know about any random zstyle-using thing. For instance, a third party plugin that looks up zstyles might want implement completion for them. It'd be a lot easier to do that if _zstyle would, say, delegate to «_zstyle-foo» for completion related to contexts of the form (:foo|:foo:*), and that function were implemented by by the foo (possibly third-party) plugin. > With "ls -", I get a list of possible options together with > a short explanation. I would expect something like that with > "zstyle :completion:" rather than just a list of the possible > completions. Patches welcome. See _zstyle and _describe. Cheers, Daniel