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 31064 invoked from network); 1 Sep 2021 20:53:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Sep 2021 20:53:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630529624; b=J7z0jJjFTv9SPPZHoJZovFL39yQsCVHW6jTFPACdLxx0sfPZxpOniSaJ9xnIQNSZaqAGt3quax lnC69juM3kx5vvqbmD3SGrPSnpMZBO8Eu5f8qMuJqxvspgLnkVAuGvdIeSqmNFwxXVj774Bau7 V9gasM62NrhsSjaqNRstTuoT9XV/mVA5k81UbUWBRI6HwYloc9LGeu1SuI60qUxVoaIRfY+gJP 3/q4hMx8XT+gYLVweSDo6LLTzM3KlPyKYez5d7wiJZea9Lc1QURfzT7dP0548q8bUh+dYA0NKx Np6UpPWidRo1/kxeFleHFBc3lBXT2gkCZRNaNDAT4fKfUg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (email.dondley.com) smtp.remote-ip=34.203.132.18; dkim=pass header.d=dondley.com header.s=default header.a=rsa-sha256; dmarc=pass header.from=dondley.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630529624; bh=6M5Zo0L8Pn8n26WGTq6BTWczlIBBnqJoW0a2YrV/XxY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:DKIM-Signature: DKIM-Signature; b=dNyg/5MyuV0RohwOHzDLbANnLLPEQhlgH5kdYpz3mXhvbjbcfTmn+zCeLHsH5iWkpnUY4URVED jR+Eto7FXSnaLPYjN9ehFikCeJMPqUFUYsbYue4v/RfXKZImfgtGHTmGYlk2SFzVM/BM0c/B+p k+1YJvhKaAVYg9ncb8ecUmlmfRdgPSamiSSX1B54iatw9p3PHU5JqsDrHIo8ftnf6JshFWC6OK hsYXd6toDjAYQDfZVjAuJ+ZBOprUuz5pMTu08vfUg77NjdvwQ+bdDYARqo0h19TztKJ+cZvznw BBvRxMRNKQVP0PsI9xyrGIKGNMNJS8wVXIVIxm2rxhTFcw==; 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:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+jWjyYmIorosFzycEUjLyAgZ1aqqu2zhi5QOHl9rmyk=; b=TYlVNukyNpAGmHMt8Pf9PnwxiB 4BkzmsNjGNNShOBGAJfCEYrXsNMyxJU418HvE2VQh5D5qESujJpapwhrCJ5tftyeXkt+NXJXRPURs KNHLt3Ng4bEZ+Mc59ZV4h5tVpYdiJJsO6hcYX/tCpb/QaqrKSx8b1m6Lp3wvme6h7KLcM31aKAd0f XdnO3qD90btyAwaSGdzgdAfRc9QerKgKgHCLf4dNERBPpDjJvE3rgeEUVpZIlSfn+VAx3+kDE9jKv FLc8oxu2x0ToiLFwQxV4kbTOPH3lWKV936a+Z96V4Un4rJrmmVodys8pKy82VJAXOvyJHvCoaiNpT FibBPZ4Q==; Received: from authenticated user by zero.zsh.org with local id 1mLXEt-0005s4-2U; Wed, 01 Sep 2021 20:53:43 +0000 Authentication-Results: zsh.org; iprev=pass (email.dondley.com) smtp.remote-ip=34.203.132.18; dkim=pass header.d=dondley.com header.s=default header.a=rsa-sha256; dmarc=pass header.from=dondley.com; arc=none Received: from email.dondley.com ([34.203.132.18]:49362) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mLXDx-0005BU-BU; Wed, 01 Sep 2021 20:52:46 +0000 Received: from email.dondley.com (email.dondley.com [34.203.132.18]) by email.dondley.com (Postfix) with ESMTPSA id 97B54208E0; Wed, 1 Sep 2021 16:52:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dondley.com; s=default; t=1630529563; bh=6M5Zo0L8Pn8n26WGTq6BTWczlIBBnqJoW0a2YrV/XxY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hC8caTFnoegnuhlzWsaLmLhHaZvdEpZXf6OUK0pvC2ZOlx252VCdcuyVuc6N+Vg3u iCrltKKPoWvSBuKFsmFnBr2oi9Q/n8+JjR5jwfgSM+UES3eRrRnjzMTnNDpqmMGtq0 h3iPYvmpHRYOOcVZfX0uf01IkvCx/dNi3MTdth5tDhQeEHurnrJ+Y0GXLzqC0n3yJl hjbV93xUcmCARFrakaHmoq7No1KJKFGlIhnld6D+CGRjrEoEBa2ZUHcBgO+2UCJt1g rnOExtvz8cdCG7ReiX5tDoQYK61vsLbXYUSZ14PxjtqvkuhYStXlrP60fG+eZgblmW 7z0q3hWNc49VQ== MIME-Version: 1.0 Date: Wed, 01 Sep 2021 16:52:43 -0400 From: Steve Dondley To: Bart Schaefer Cc: Ray Andrews , Zsh Users Subject: Re: Best practices for managing aliases in ohmyzsh? 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> User-Agent: Dondley Message-ID: <7b859a6839fd04f222b63bac3b485287@dondley.com> X-Sender: s@dondley.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Seq: 27061 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: > No. "#!" is a comment, because it begins with "#". Correct. #! is treated as "magic" sequence by the OS. It's only looked for when you first execute a file. Otherwise it is treated as a command and ignored. Here's more information than you could possibly read through: https://www.in-ulm.de/~mascheck/various/shebang/ > >> What if you source a file with another shell's shebang? > > 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." The shebang line will get ignored, as you pointed. Any code will be interpreted as the shell of the parent sourcing the file. If the script was written in bash but happens to run fine in zsh, it will work perfectly fine.