From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 1f162219 for ; Tue, 23 Jul 2019 20:51:58 +0000 (UTC) Received: (qmail 7747 invoked by alias); 23 Jul 2019 20:51:46 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24091 Received: (qmail 22383 invoked by uid 1010); 23 Jul 2019 20:51:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f174.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25517. spamassassin: 3.4.2. Clear:RC:0(209.85.208.174):SA:0(-1.9/5.0):. Processed in 1.578732 secs); 23 Jul 2019 20:51:45 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.174 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YAqZrmoLvVCMvZLt9puNZOWaw+cNjYCYHOwaxdyCPGU=; b=QYCFE46mOdJvq8AQjTgOSh34079RhwC1Uxq3ry6DZazNKl/rBiQWBSP3E6pHkXeTBp WAkCxgcSNDODBs0Wy2Vz0GjUNoDnRiIC88c8+2Pv3RXBLDWKhwDNA1soVkhtgBfH8wJR uOUTd5slN5O6RONa0NdSvABNxKHitltgTqPsQkE8/cmdO9bvoqKNCVMEEvhrAlhCN8+8 JdspKka9l7h7tYLbCkTApO5XIcb17ZF/4ECFMjMuPovbmVN48s6qRbIggDdEs4/G4Zqy x6LbrNkvvUENoVcsYZuZ2VwOUarhWDYO5kz4s1rfF1uuLoXzhRoZcX5VIsKJxLpxS3HH 1hyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YAqZrmoLvVCMvZLt9puNZOWaw+cNjYCYHOwaxdyCPGU=; b=ez99wq7ce0Njfhp7p3mcVmsUzyDlQAUpC9OtLuTD+PDrn60ANjQXJXxhEDuaUYtB9L cLJUsNeAO61XWLLAEp9aGS4dj0aQnZ0bQsht5tnjYkSVZXn+zuqQ5JPRfl2urgNpwfMJ QCyNVROTaMF1Jsi7SQJkWrqEP2ZNGken9v46V2QTZU+Ov7tpIDfphesXYhvk7TYF3qO2 wZ1KPfYKHvHbXOP39L5vGuITbudU8miEZWiGgqJFaNrvbLgbP4yby9cwRL9Mj6+jTtb0 8L9dsE4KEBC46eGkG8f98gFly62p5+jsQiipR3jkQ/WppZfu6inpj/xQuDbo0H1Vasan adGA== X-Gm-Message-State: APjAAAVQiqYb7hyq4bZnCrh72ugkNANPHLHe1esol0pGL5tZCmrvK8Qt sG6Ck6sKRjmXS9NitzlTlwx052SkuJOQqGSvZOI= X-Google-Smtp-Source: APXvYqy5vGO9P6wZHg5MyHXvEki2+vjEo1FPFtWphSE3BFnps9EzczZhUwKV4UsxLppGUimwTCDpRpgV9E0tHH6gOME= X-Received: by 2002:a2e:86cc:: with SMTP id n12mr16283999ljj.146.1563915068388; Tue, 23 Jul 2019 13:51:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Tue, 23 Jul 2019 13:50:56 -0700 Message-ID: Subject: =?UTF-8?Q?Re=3A_ZQL_=E2=80=93_a_language_for_=2Adeclaring=2A_scripts_conte?= =?UTF-8?Q?nt=2E_Any_ideas_for_changes_maybe=3F?= To: Sebastian Gniazdowski Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On Mon, Jul 22, 2019 at 9:28 AM Sebastian Gniazdowski 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.