From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 1060022006 for ; Fri, 26 Jan 2024 07:26:29 +0100 (CET) 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-Transfer-Encoding: Content-Type:Subject:Cc:To:From:Date:References:In-Reply-To:Message-Id: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=On8OBmP9uGQU4wm7ZXu9UswwwfzAAIuf7M/EmLfa0YU=; b=p1ysjkanvKMhx9UdWHK5TYCKlQ 82peZBMixyyP4kslJ6yud6AX7FeSgwkMkE4zTCrghhDaYRruGLp0grFotaM3KfnhuJ38m2Q/4CI3C 3qI0jatfYx82tZYA9Ilwa6Jpdr+EcwFqhUKR9e8T96ZMXcXgSxqJSj7rThFVD5b/lpCRNeQJqtvLx 3OfVy5rWYuj+EX7UZ4GOeP27mSNgEOFCD1qNXSB8RPK6MLYssDNpAGP5d5jBxPRrGNJqQGUFbZNVI cxJ0EPdnUIYe+QQoeaBlfkW6FfQ2UPsmBGKA7ylczuSUzkA+AKMcAtzpmrxnMxP+eVn9BGLUutrB0 aroyz04w==; Received: by zero.zsh.org with local id 1rTFfZ-000Lgr-A3; Fri, 26 Jan 2024 06:26:29 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rTFey-000L2x-5T; Fri, 26 Jan 2024 06:25:52 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 71A3F27C0061; Fri, 26 Jan 2024 01:25:50 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Fri, 26 Jan 2024 01:25:50 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeliedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgfgse htqhertderreejnecuhfhrohhmpefnrgifrhgvnhgtvgcugggvlhojiihquhgviicuoehl rghrrhihvhesiihshhdrohhrgheqnecuggftrfgrthhtvghrnhepheegieduieegvddvff dvgeefuddugfetvdettddtfedutdejvefgjefgveethedunecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhihvodhmvghsmhhtphgruh hthhhpvghrshhonhgrlhhithihqdduudehudekjeejtdegqdduudelvdejfeekhedqlhgr rhhrhihvpeepiihshhdrohhrghesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id EF61C31A0065; Fri, 26 Jan 2024 01:25:49 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-119-ga8b98d1bd8-fm-20240108.001-ga8b98d1b MIME-Version: 1.0 Message-Id: In-Reply-To: <2CF29A22-6721-4275-8E92-7FF61CE4CDCB@dondley.com> References: <73E4333B-C282-4A58-837C-A50F73E13289@dondley.com> <680FA5D3-E8FD-49F2-9AE3-C169A6D9DA9E@dondley.com> <4a1df20e-70c4-41ed-b370-4fbbae0619b9@app.fastmail.com> <3DC872AC-5B19-468D-85D5-5D3A501EF7E9@dondley.com> <2CF29A22-6721-4275-8E92-7FF61CE4CDCB@dondley.com> Date: Fri, 26 Jan 2024 01:25:29 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Steve Dondley" Cc: zsh-users@zsh.org Subject: Re: Can't tell the difference in operation between PATH_SCRIPT and NO_PATH_SCRIPT Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 29574 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Jan 26, 2024, at 12:20 AM, Steve Dondley wrote: > OK, thanks. > > At the risk of dragging this on, allow me to ask this simple question=20 > to make sure I got it: > > Is there any way to run this command by itself on the command line: > >> setopt pathscript > > And have it affect the outcome of any subsequent commands? It looks=20 > like the answer is no. Correct. It does not affect regular command execution (and is not intended to). > It looks to me like the pathscript setting can only affect future=20 > commands if it=E2=80=99s either: > > a) used with +o or -o as part of an argument passed directly to zsh=20 > while running a script > b) or if it=E2=80=99s set in a .zshrc file (or other config file) and = then=20 > sourced when a new shell (interactive mode) Those are two ways to enable PATH_SEARCH for a new zsh process, sure. Bart listed some more. But "affecting future commands" is not really the way to look at it; the option is not that general. PATH_SCRIPT affects one very specific behavior: whether or not ''zsh foo'' searches PATH for a script "foo" if ./foo doesn't exist. It does not affect anything else, including PATH search *within* that script. Probably should have asked earlier, but: What were you trying to achieve with PATH_SEARCH, exactly? --=20 vq