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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9935 invoked from network); 1 Sep 2021 03:29:07 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Sep 2021 03:29:07 -0000 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=JodDdTydkpTuB1HeWCMqK63E2wOmWmL2RB1fNbvsdyY=; b=cz79aJOCRkQfutpi8vIUa97EIZ cL47rkFX9QlqVZLxfRpn2UcdG6UTRTCzb+bmv6npDw0F7l2g8DeVR7u2X0REdcKOUi342O0ct6jVF YlpccvIechmdHibBoDl6mtOpxAIEX2ydBUcoSEoUkWuhV2E18yoXy0RJMFu2IO4o5P8Sugm8GG58U mskYFwJEFhgOIjXLE9U6Xq5iIm76MNrVqd92qe9DpEb+44Qd+wukCecwQ/Lhsv4aWZzi5rl1M/nNF Ev7YLqJNHJXhFHNYeZ1pbQvSncM7p9rzHtacIB80ucsBphtZouJrpBP42f98siSpI09W23n+b+yUX PXWXYeJw==; Received: from authenticated user by zero.zsh.org with local id 1mLGvy-0004dd-Go; Wed, 01 Sep 2021 03:29:06 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mLGvC-0003uq-4N; Wed, 01 Sep 2021 03:28:19 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 8300F27C0054; Tue, 31 Aug 2021 23:28:16 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Tue, 31 Aug 2021 23:28:16 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvvddgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnrgif rhgvnhgtvggpgggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnheptddtjedtudffjeefleeitdeuffegkeettedtiefgvdeiteeutddv jeevtdeikefgnecuffhomhgrihhnpegtfihirdhnlhdpihhnqdhulhhmrdguvgenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdo mhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedquddule dvjeefkeehqdhlrghrrhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id C9E33A00556; Tue, 31 Aug 2021 23:28:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1126-g6962059b07-fm-20210901.001-g6962059b Mime-Version: 1.0 Message-Id: <00160177-798f-4dcc-a4ef-da6c3663883c@www.fastmail.com> In-Reply-To: <29064969-76d0-48a1-cb4a-719a9acaab29@eastlink.ca> References: <41fa241f119fdb9b8598293aad345823@dondley.com> <776abe09c579095258b2eef28a7ad5ca@dondley.com> <1ee1545904fdc1b5f473460cddfe5000@dondley.com> <29064969-76d0-48a1-cb4a-719a9acaab29@eastlink.ca> Date: Tue, 31 Aug 2021 23:27:07 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Ray Andrews" Cc: zsh-users@zsh.org Subject: Re: Best practices for managing aliases in ohmyzsh? Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 27043 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 Tue, Aug 31, 2021, at 10:33 PM, Ray Andrews wrote: > On 2021-08-31 5:28 p.m., Bart Schaefer wrote: > > Sourcing a file is not the same as executing a script. > > > Yikes, I'm missing something fundamental.=C2=A0 In my head, executing = a=20 > script is identical to sourcing it. If you want to go a little deeper than Bart's summary, here's some light bedtime reading. https://homepages.cwi.nl/~aeb/std/hashexclam-1.html https://www.in-ulm.de/~mascheck/various/shebang/ > If a function is declared (yes I know, wrong word but you get my > meaning) then the function enters memory, otherwise it's > interpret-and-forget until next time, no? I don't really know what you mean here. > If 'chmod +x' then you don't hafta 'say' 'source me', it's > automatic, and it will be found if on the path, etc, but I'm > laboring under the idea that nothing else is different. It's trivial to confirm that this is not the case. % cat ./foo #!/bin/zsh foo=3D2 typeset -p foo % chmod +x ./foo % foo=3D1 % typeset -p foo typeset foo=3D1 % ./foo typeset foo=3D2 % typeset -p foo typeset foo=3D1 % . ./foo typeset foo=3D2 % typeset -p foo typeset foo=3D2 --=20 vq