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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20919 invoked from network); 17 Feb 2023 21:13:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Feb 2023 21:13:06 -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=gS2OhtQybITty3ArzMaXsc86jqofEjYTcQsAnQ1damY=; b=NwzVxo4la3zCYJZdXL4lRzmyy3 CHHdE5Z0+XENTFMoCjHa4feVD0Km1kB1tgOoopiltUagP9fmcITkemZf8MvYxwEHr6m/DwAWCxEl0 NSAQxMN5rLAqfIeZW1g8Exp1QLCN5ajhAcgZJqMOs9gXu5AcuXajd9QGIG3Dsddf6tgB6enWyrAX3 t1NKzlZEywFQXwehp1z9+r82A+xmIHK33K/eTzTGV1LM2keMc48vBLOG7fjUphYuwKFfp8uqCrTvo dyQNPZPwdEtaq99wvlzyHxYDJ+arm5tHkrDyB+P5tefaqIsSyagR2np2EweIjgUzONsPf+/ejtnw+ 1Lq8k4fg==; Received: by zero.zsh.org with local id 1pT82U-0007RR-1c; Fri, 17 Feb 2023 21:13:06 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pT81w-00077w-CH; Fri, 17 Feb 2023 21:12:32 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 3E68627C0054; Fri, 17 Feb 2023 16:12:28 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Fri, 17 Feb 2023 16:12:28 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeiledgudegfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreerjeenucfhrhhomhepnfgr fihrvghntggvucggvghljoiiqhhuvgiiuceolhgrrhhrhihvseiishhhrdhorhhgqeenuc ggtffrrghtthgvrhhnpedvkedvudeludetgfeffeefvdelfeehleejjeehtdekgfffieff vdevheefveelffenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihvhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqudduhedukeejjedtgedqudduledvjeefkeehqdhlrg hrrhihvheppeiishhhrdhorhhgsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 12A3731A0063; Fri, 17 Feb 2023 16:12:28 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-156-g081acc5ed5-fm-20230206.001-g081acc5e Mime-Version: 1.0 Message-Id: In-Reply-To: References: Date: Fri, 17 Feb 2023 16:11:47 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Sebastian Gniazdowski" Cc: zsh-workers@zsh.org Subject: Re: what can be global aliases used for? Content-Type: text/plain X-Seq: 51452 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Feb 17, 2023, at 9:54 AM, Sebastian Gniazdowski wrote: > I wonder what else can global aliases do? An esoteric but amusing example: 1) Autoconf uses ${1+"$@"} instead of "$@" to work around a bug in pre-SVR3 Bourne shells. 2) This doesn't work properly in pre-4.3 zsh because SH_WORD_SPLIT splits ${1+"$@"} too aggressively. 3) But zsh doesn't have a problem with "$@" in the first place, so Autoconf defines a global alias that dynamically replaces ${1+"$@"} with "$@", undoing the original workaround. https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Shell-Substitutions.html#index-_0022_0024_0040_0022 -- vq