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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31387 invoked from network); 24 Jun 2020 09:28:55 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 24 Jun 2020 09:28:55 -0000 Received: (qmail 4038 invoked by alias); 24 Jun 2020 09:28:48 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: Sender: zsh-users@zsh.org X-Seq: 24957 Received: (qmail 18500 invoked by uid 1010); 24 Jun 2020 09:28:48 -0000 X-Qmail-Scanner-Diagnostics: from out2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25850. spamassassin: 3.4.4. Clear:RC:0(66.111.4.26):SA:0(-2.6/5.0):. Processed in 4.871089 secs); 24 Jun 2020 09:28:48 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekjedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjggfsehtkedttddtreejnecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeevfeeggfeiffetfeffgfefkeeufeekkeelgfekheeiudfh vefhveeuueejhfevgfenucffohhmrghinhepshhouhhrtggvfhhorhhgvgdrnhgvthenuc fkphepjeelrddujeeirdefledrieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Wed, 24 Jun 2020 09:28:04 +0000 From: Daniel Shahaf To: Perry Smith Cc: Bart Schaefer , Zsh Users Subject: Re: Alias call in function fails... Message-ID: <20200624092804.GA19280@tarpaulin.shahaf.local2> References: <20200623120429.2c889b67@tarpaulin.shahaf.local2> <2982509.CQOukoFCf9@nbkamil> <0DAEBDBF-F680-4BE8-BF63-AEE98236F631@easesoftware.com> <20200623225409.0380caad@tarpaulin.shahaf.local2> <31DB587E-DFAD-46F6-84A9-1419A9FADE99@easesoftware.com> <8BE2B98E-923F-4576-9664-825E532FA3BE@easesoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8BE2B98E-923F-4576-9664-825E532FA3BE@easesoftware.com> User-Agent: Mutt/1.10.1 (2018-07-13) Perry Smith wrote on Tue, Jun 23, 2020 at 19:47:05 -0500: > > > > On Jun 23, 2020, at 6:43 PM, Bart Schaefer wrote: > > > > On Tue, Jun 23, 2020 at 4:30 PM Perry Smith wrote: > >> > >> Ahh… ok. Thank you. I remember reading that now (before your changes) > >> but didn’t really ingest it. > > > > The more classic example is something excessively abbreviated such as > > > > % alias -g L='|less' > > % find ~ -name \*.gif L > > For me, I think I would more likely do something like: > > % alias -g opts=“-a -b -c -d” > % foo opts path/to/file > > But, given my relative inexperience with zsh, I not think about alias -g and > would likely do: > > % opts=“-a -b -c -d” > % foo $opts path/to/file > > or use alias -g to save a really long ugly path. etc. > The second example won't work with the default settings (see http://zsh.sourceforge.net/FAQ/zshfaq03.html#l18). The standard workaround is to use an array variable, and I'd like the example to show a use of aliases that can't easily be achieved without them. (This also goes for Grant's example.) Cheers, Daniel > or use alias -g to save a really long ugly path. etc. >