From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20513 invoked from network); 6 Nov 2021 20:53:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Nov 2021 20:53:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1636232025; b=Kf3lWbhIPTG0ztXWDMIYH41WfA3gewX1LLQPrCsWZSueMv0E+WU4dh6z151Cin5wOhD9eI3N7F nzxUz9CUrJkCYEYqfkr/JscaumRiofr3uLqHKb7+7tSNXimz7yh6xIMYkoG/y16rdZplBCwAcX ZkilcqqEb2BC0Xpb3URBhCr6RgNSXPhPp21ez9FugNvoFb/+VOea/5kwHc9fTIXn1A2/rUI0XV oaOwELU2EyXcYwuKqOdvf0JhAcd8da1gQnoGraygleCFCjLp60NoaFssxUyp3xfdXFyGI7NNlz 0QUjeRiE6Lxgp7BMRLOCqgLUUQLJpAcESK4tUI+l+Uirrw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1636232025; bh=nbKx7/BxbCSaqx7W0VnFdP+RnliYR+uU+Js4D5RLNC4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=TDs6CIU6YQPgu6h6HeeapiJ3MwscXgE/p+vAYZ3iHIiGMTCeN6D8S7olkqu14DtYtImbez5knY 4Q57CK2DlQN5tTK9mhunMU5aeld2ZgZtTrdhopl5ILXIm4lABJN2OiWOZwqqmdP19RWO864Xw9 4sgPii8nGbRd/uySpUrFcNXFHdJYXx0L2nRH4OnO6PY91KFy1IlKDEGzEdNcjiMbg+Wv5tJJ/+ At2jlyvabzg9h7miA9CBMMLRiVVUxA+2rksL2s7wveEkpJZu9A/MWq8qtbsO1Xc8A+4BB6uLOE YZyMzuWcrOmdK+63EoxZIf1x9oa3SGN1DcDGQwrwAOPbNQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=2AMiCSdDLi7bAlJ4m1gyKarnf+sCERpaZsUoTDZG+Lk=; b=KtVbW+koaJWD6yob2qhl1QNlP9 NHpQVK/0zWXTlkkffTfu7l3cACiXGQpdL40gfmDRFTygA4dI7Z069JMCtkTLYT/iw5muUfD/RpOwa lUw7TRSnaEgirtq1EQQJcJO5+c02KdqJm71EI3beNdYsci0OrSCgkj+xz5RR2CxVYaogQAfYgQVl9 wJA46+nWcKyoQJJOVG0OY9hEH8UPmI0XBVB924gDgu7d2F2v/L4A8diTrrLLWlCEfdxS0ZncZyVvC UzfjAvbmD617qBYwqhCTNDDZBWyRWhelrXhKyfNrxTJPZS0TeYak+FTy+yqP6Z64Ifyo5yWmBNOXk LNyiD4BQ==; Received: from authenticated user by zero.zsh.org with local id 1mjSh6-000FHo-Dn; Sat, 06 Nov 2021 20:53:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f169.google.com) smtp.remote-ip=209.85.219.169; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f169.google.com ([209.85.219.169]:37693) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mjSgt-000F0r-A6; Sat, 06 Nov 2021 20:53:32 +0000 Received: by mail-yb1-f169.google.com with SMTP id e136so28984370ybc.4 for ; Sat, 06 Nov 2021 13:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2AMiCSdDLi7bAlJ4m1gyKarnf+sCERpaZsUoTDZG+Lk=; b=ql12VxozSjdujl3lQ1QUMg0czzxYrsdmyWU2hCT7tO+DeymK/Ix97NAefI37vIA1Qy ORvXptXYWtYcVL+r8YB8EDA9Qw/O+LkkFoCRBv1E3Vw55sx2G+xOgP0fZWo4FOmgeSjw vlWl+7oj4AJKUwfMWl4WZhQaSAJSp4+wNKkawzViNnwvRy6ZNaRODEFEUcal+cpmZikd p+PVc60nywf4HPt/r9O4mAHxFqzfJ42Dcv6mMkM6Qx6rAMfYzwfN2WpQeox+XGCyS1SJ 9kOYUcyuojZG76L1Bn1BEjkIPAJYC81qsoO8lu9Sc+L5SaQVSrU2IGGEQgq0g5OasUVX qZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2AMiCSdDLi7bAlJ4m1gyKarnf+sCERpaZsUoTDZG+Lk=; b=4zHXpPrf4/tmV0nHvryT/sxVF13EepUK0/hwAqUArRkNZZO+i8pf4hRySYdmIIy6re M6ETGvBirmcNfTbKPUZ7gxAKDxPycuR9f9b0tW39MSdnC43b/mysNeTZlfyRZFrZR0fY U+dDkAiMgFCqpjkeNQjYRwus6dd6AXZWmV2hgFY7lkowHm+9XJG5+F/fZ3zQDemuAbGI vrTkZUpCRb5rz3w9hbemeP325LxVNnWHFO8rsQsdnj/LNMWUGtdc3+uaJKY4NAXBy7qK YmRmV4XlAtGAm11nPnQT+IyODDwYqoipxqUXcLc65xoxL5J8CRH7BkgdJ0ze1ZAF9P27 NQ0g== X-Gm-Message-State: AOAM531f3VGBlM/uWwAuc45gu7S/HAzy6wAs0gNxKccUGQ+9VW2G3sD6 s+URWxkbxCTe2RSgE/z641cgdS8kOfTW2/FHOzVTnlm1vQP2yQ== X-Google-Smtp-Source: ABdhPJwHKU3VB+7zsYDqivwKQgpMLU+5Uan38KJ1ioJA04TVTdFT40COb+5V9ZJnann2GOrTaO4t7LeSBXoSqodElTc= X-Received: by 2002:a25:2f13:: with SMTP id v19mr73524542ybv.410.1636232010071; Sat, 06 Nov 2021 13:53:30 -0700 (PDT) MIME-Version: 1.0 References: <41833-1635545739.955327@NiDy.UqMC.wWcd> <99024-1635725195.643285@RFFV.JZgp.GVTq> <43155-1636157867.215533@Ne4o.Iiwb.hwym> In-Reply-To: <43155-1636157867.215533@Ne4o.Iiwb.hwym> From: Bart Schaefer Date: Sat, 6 Nov 2021 13:53:18 -0700 Message-ID: Subject: Re: PATCH: separate watch/log functionality out into a module To: Zsh workers Content-Type: text/plain; charset="UTF-8" X-Seq: 49548 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Fri, Nov 5, 2021 at 5:17 PM Oliver Kiddle wrote: > > > Hm. What would the right behavior be? Do we need a flag on the > > autoloaded parameter for whether the value is [not?] allowed to come > > from the environment? PM_DONTIMPORT seems potentially relevant. > > I'm not sure whether PM_DONTIMPORT really helps at all. My thought was that the module bootstrap could examine its paramdef array for PM_DONTIMPORT and either warn about, or skip marking for autoload, any variable with that flag that is already in the environment. > But for a parameter like WATCH, it'd ideally load the module and use the > imported value. Is it an important feature that $WATCH can come from the > environment? I don't have a feel for this. As you pointed out earlier in the thread, the prevalence of multi-user environments has diminished. > On further testing zsh/watch does need to better guard against one of > them coming from the environment. They can only be tied if both are > there. The patch below covers this case. How was this dealt with in the base shell, before you modularized it? Array values ($watch) can't be imported, so something must have happened when WATCH alone is an environment value at shell startup. I would think the ideal behavior would be "as if": local W=$WATCH unset WATCH zmodload zsh/watch [[ -n $W ]] && WATCH=$W # triggers autoload and tie > Can someone with a Mac confirm something: have they disabled the log > builtin because it clashed with an external command. /bin/zsh on Catalina has not disabled the builtin; I don't have a Monterey install to check. > A log(1) > man page does seem to exist NAME log -- Access system wide log messages created by os_log, os_trace and other logging systems. Seems to be borrowed from BSD.