From: duvall@comfychair.org
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Sebastian Gniazdowski <sgniazdowski@gmail.com>,
Zsh Users <zsh-users@zsh.org>
Subject: Re: ZQL – a language for *declaring* scripts content. Any ideas for changes maybe?
Date: Tue, 23 Jul 2019 15:09:58 -0700 [thread overview]
Message-ID: <20190723220958.GA30369@comfychair.org> (raw)
In-Reply-To: <CAH+w=7ZkF==CoRWHfsRUgcY4=xQcO21DGMi4=72dDu7FEv9qCQ@mail.gmail.com>
On Tue, Jul 23, 2019 at 01:50:56PM -0700, Bart Schaefer wrote:
> On Mon, Jul 22, 2019 at 9:28 AM Sebastian Gniazdowski
> <sgniazdowski@gmail.com> 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.
IMO, it would make sense to just install files in a directory and only have
.zshrc source them all (either using a well-known ordering mechanism or
implement some fancier dependency system). Then you don't need a brittle
mechanism to edit (multiple times, and then to maintain the lifecycles of those
edits) a file that's nominally under user control, other than to insert a single
line.
Danek
prev parent reply other threads:[~2019-07-23 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 16:27 Sebastian Gniazdowski
2019-07-22 19:01 ` Ray Andrews
2019-07-23 0:49 ` Sebastian Gniazdowski
2019-07-23 20:50 ` Bart Schaefer
2019-07-23 22:09 ` duvall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190723220958.GA30369@comfychair.org \
--to=duvall@comfychair.org \
--cc=schaefer@brasslantern.com \
--cc=sgniazdowski@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).