zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: 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 13:50:56 -0700	[thread overview]
Message-ID: <CAH+w=7ZkF==CoRWHfsRUgcY4=xQcO21DGMi4=72dDu7FEv9qCQ@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVAy+R+D7eyAxNWQWKSj_xSLNcOLH34rX4RxazJzdT2v1Q@mail.gmail.com>

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.

  parent reply	other threads:[~2019-07-23 20:51 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 [this message]
2019-07-23 22:09   ` duvall

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='CAH+w=7ZkF==CoRWHfsRUgcY4=xQcO21DGMi4=72dDu7FEv9qCQ@mail.gmail.com' \
    --to=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).