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 31334 invoked from network); 1 Sep 2021 20:55:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Sep 2021 20:55:50 -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-Type:Subject:Cc:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=FqUWlnHzxhlnZv4S/x1QK6kQu5upbjk51LtITx0hNmw=; b=O3+DRD2S0tp++acR+VMN65bjr2 zF7/D//8k1SO8B0LPxaE1Yv2TNw6H51YCoCuxO3PT4WbBMnonkx1JyBqMEMnQ3m7MnO2PrRR+NojM 5D59d4gzK/7ePJikGZZZ1mImeDclByykT5VAq07we3obW3avZeKe01L1aSqFFkgwnLyGradKc0Oq5 YqlA3gBL6XYpjwEldlyuXKfSF3fh+0QXlofHI2FDB3BsqWKU8DacTQb3Z9x41dN+27WfbYrlzF4pQ DA21QOOBw1tYQ805tJa0q/CK/Xd9Qf3+FjTa4oKdV6fPpN6uSv3yKpWz9yW+oTM66QUy9lRrEdCbl l0X4d5og==; Received: from authenticated user by zero.zsh.org with local id 1mLXGw-0007Cr-Ky; Wed, 01 Sep 2021 20:55:50 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mLXFl-00068R-96; Wed, 01 Sep 2021 20:54:37 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id B851527C0099; Wed, 1 Sep 2021 16:54:35 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Wed, 01 Sep 2021 16:54:35 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvfedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderreejnecuhfhrohhmpefnrgif rhgvnhgtvggpgggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepieekjeevledugeefiefgueelgffgtddtgeehvedvhedviefghedv ffeuvddvueehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheplhgrrhhrhihvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeh udekjeejtdegqdduudelvdejfeekhedqlhgrrhhrhihvpeepiihshhdrohhrghesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2D787A002E5; Wed, 1 Sep 2021 16:54:35 -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: <3e294425-c74b-4218-ad54-ac7044cf2171@www.fastmail.com> In-Reply-To: References: <41fa241f119fdb9b8598293aad345823@dondley.com> <776abe09c579095258b2eef28a7ad5ca@dondley.com> <1ee1545904fdc1b5f473460cddfe5000@dondley.com> <29064969-76d0-48a1-cb4a-719a9acaab29@eastlink.ca> <7248837b-fe22-4faa-8f2a-4e62973d5f91@www.fastmail.com> <7ed02d4d-a7b8-e457-f814-dc88e1cf5c35@eastlink.ca> <079751a8-0494-0432-d4b6-f8f3e6e3e2f9@eastlink.ca> Date: Wed, 01 Sep 2021 16:53:27 -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 X-Seq: 27062 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 Wed, Sep 1, 2021, at 4:03 PM, Bart Schaefer wrote: > On Wed, Sep 1, 2021 at 12:56 PM Ray Andrews wrote: > > What if you source a file with another shell's shebang? Even before getting to language mismatches, it generally doesn't make sense to source a file that has a shebang because such a file probably assumes that it'll be run in a separate process. For instance, it might create a lot of temporary variables or utility functions and not clean any of it up. Similarly, I don't think you should include a shebang in a file that is not meant to be executed by a separate interpreter because that is the whole point of shebangs. Including one sends a strong signal that that file is supposed to be executed. > Sufficiently portably written shell code might work, and there are > some tricks you can do in some languages that have superficial > similarities so that incorrect interpreters can recognize themselves > and do a backflip, but for the most part it is indeed "barf." Observe: % cat ./barf.py #!/usr/bin/python import sys print(sys.argv) % chmod +x ./barf.py % ./barf.py 1 2 3 ['./barf.py', '1', '2', '3'] % . ./barf.py ./barf.py:3: command not found: import ./barf.py:4: unknown file attribute: y -- vq