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 34038230E0 for ; Fri, 26 Jan 2024 04:06:33 +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=mLjyFGV3K4c0PStjEFiipbnM7mUFpIz46uobOZEej54=; b=O6CX2dngptS68rTVD8H7ENLYhX xJIAmfydO6fhxdz+twWlBtmLdDqn6xUhxzEWmhX8zy42jks1HB3OQDBbMWyHf9SKOHXJ5O98VVYtE bdWad0MSPbOQio8b6AM3W5MHxsVoo3PSTJqAhu9c/wdZWFLM1dBIgGzOibYuS6R8bMPAvx6PUGHz6 Zs5op+FLODLQP04uiYKzflDNGVKsS4e4gfOrqPg5DeKQ47JHuqVYY5ccvDnoTVARblwgbdaPKPR4H oho9tGU36L54FbqH/oq9Mriob5K/PZIFirXW8+Fs9mWjUL1y0fEvNJRopqjSyl2qZ2Ks+4Tix1ir6 J4RFEFwA==; Received: by zero.zsh.org with local id 1rTCY4-0003Xu-K7; Fri, 26 Jan 2024 03:06:32 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rTCX7-0002s4-MO; Fri, 26 Jan 2024 03:05:34 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id A18D427C005B; Thu, 25 Jan 2024 22:05:31 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute2.internal (MEProxy); Thu, 25 Jan 2024 22:05:31 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeliedgheefucetufdoteggodetrfdotf 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 22A2631A0067; Thu, 25 Jan 2024 22:05:31 -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: <73E4333B-C282-4A58-837C-A50F73E13289@dondley.com> References: <73E4333B-C282-4A58-837C-A50F73E13289@dondley.com> Date: Thu, 25 Jan 2024 22:05:10 -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: 29565 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 Thu, Jan 25, 2024, at 9:00 PM, Steve Dondley wrote: > I=E2=80=99ve been looking over the documentation and I really can=E2=80= =99t make sense=20 > out of what the PATH_SCRIPT option is supposed to do. > > If it=E2=80=99s set, which it is by default, I think it=E2=80=99s supp= osed to look=20 > through directories PATH and try to find the command. But if it=E2=80=99= s not=20 > set, it doesn=E2=80=99t look through directories in PATH. > > At least that=E2=80=99s my understanding. But as a far as I can tell, = I can run=20 > a command in /bin with or without PATH_SCRIPT option set. > > I=E2=80=99m obviously confused about what the docs are saying. Can som= eone shed=20 > light on this for me? The option affects how zsh behaves when invoked without -c or -s and with a first non-option argument that doesn't contain any slashes. In this situation, shells generally try to find and run a script with that name in the current directory; if there is no such script, they try to find one in PATH. PATH_SCRIPT lets you control whether zsh performs that fallback PATH search. (It does not affect other PATH searches.) % cat foo.zsh cat: foo.zsh: No such file or directory % cat dir/foo.zsh print foo % PATH=3D./dir % /bin/zsh -o PATH_SCRIPT foo.zsh foo % /bin/zsh +o PATH_SCRIPT foo.zsh /bin/zsh: can't open input file: foo.zsh --=20 vq