Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZQL – a language for *declaring* scripts content. Any ideas for changes maybe?



On Mon, Jul 22, 2019 at 9:28 AM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> when I once tried NixOS, a system with declarative configuration at
> its core, i was naively expecting that I'll be able to declare zshrc.
> So, for example, that I'll be able to write some kind of rule "append
> command {X} to the end of the zshrc if it's not somewhere in the
> file".

You should have a look at the "newuser" module and zsh-newuser-install
function, also at Functions/MIME/zsh-mime-setup and
Completion/compinstall ... these all implement something or other of
the sort.  The general approach is to mark off sections of the file(s)
with keyworded comments and then restrict the operation of the
"declaration" routines to the corresponding commented sections.

There's probably a lot of recent stuff that could be added to at least
newuser and compinstall.



Messages sorted by: Reverse Date, Date, Thread, Author