Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Most minimal configuration challenge
On 2022-09-02 09:26:40 +0000, Daniel Shahaf wrote:
> Vincent Lefevre wrote on Wed, Aug 31, 2022 at 11:28:31 +0200:
> > On 2022-08-28 18:29:27 +0000, Daniel Shahaf wrote:
> > > zstyle has been explained multiple times in the past so you might want
> > > to look those up and ask about parts that are unclear to you.
> > >
> > > In short, «zstyle ':foo:bar:*:baz' key v1 v2» translates as "When
> > > library foo asks for the value of key in a situation of the form
> > > bar:*:baz, tell it the answer is «v1 v2»".
> >
> > Perhaps there should be a zsh function that translates a zstyle line
> > to plain English. :-)
>
> What do you have in mind, exactly? It'd be pretty easy to write
> something that, say, runs «zstyle -L» and applies the sh-to-English
> mechanical transformation I did above. That's just a compiler…
The above is not very helpful for the end user.
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.
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.
Moreover, for ':completion:*', it is difficult to find the associated
documentation, because if one searches for "completion" in the zshall
man page, one gets too many matches.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author