Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Alias named '='
- X-seq: zsh-users 22921
 
- From: Vincent Bernat <bernat@xxxxxxxx>
 
- To: René Neumann <lists@xxxxxxxxx>
 
- Subject: Re: Alias named '='
 
- Date: Sun, 08 Oct 2017 10:29:02 +0200
 
- Cc: Zsh Users <zsh-users@xxxxxxx>
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=luffy.cx; h=from:to:cc	:subject:references:date:in-reply-to:message-id:mime-version	:content-type; s=postfix; bh=7UxhSQSUK57x6gtp9jYENArAwJo=; b=QHd	JKjxQuX0Xn4+G5Za/O3FhcTCixd2fv5I/cBuEnC9Uv/B6LArNfB2r74f+rvWNqCa	OtFE839Ew0Tjmiy8iLPSbPl3O+xIMWpHvEuaNgGfHBDKLZ5xV4A5MN0pFUE/f4Wi	cz//5oi8RF6j+qd5G9i63yfyGJ7a7sY6A4TfFucE=
 
- Domainkey-signature: a=rsa-sha1; c=nofws; d=luffy.cx; h=from:to:cc	:subject:references:date:in-reply-to:message-id:mime-version	:content-type; q=dns; s=postfix; b=Xheaw6IKnC0FAI2BI9finpxfJPepS	rp515iVNc3w/DwLl4TjoGwEfZeqqo4RhSLEhbEzPBA9skstsqfHHMOhFg8p3o7sM	c3G+CWGVjFV4ipFf/fEhHA5bRgq//+HzVrZImlkyj21WoR48X6ICC9zEmRW0Ff3+	nN4BDYc8ebLMQs=
 
- In-reply-to: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu> ("René	Neumann"'s message of "Sun, 8 Oct 2017 10:03:52 +0200")
 
- List-help: <mailto:zsh-users-help@zsh.org>
 
- List-id: Zsh Users List <zsh-users.zsh.org>
 
- List-post: <mailto:zsh-users@zsh.org>
 
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
 
- References: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu>
 
 ❦  8 octobre 2017 10:03 +0200, René Neumann <lists@xxxxxxxxx> :
> I stumbled upon the idea to define a function '=' to have an inline
> calculator in zsh [1].
>
> As multiplication is a normal operation, I also want 'noglob' behavior.
> There seems to be no way of defining this for a function (or is there?),
> so the only way would be to haven an alias
>    alias '='='noglob ='
>
> But this seems to not be possible, yielding 'bad assignment': The alias
> command seems to hard-parse until the first equal-sign -- even tricks like
>    alias $'\u3D'='noglob ='
> do not work.
I am using "c" instead of "=", but you can use "=" with:
aliases[=]='noglob ='
-- 
Use the "telephone test" for readability.
            - The Elements of Programming Style (Kernighan & Plauger)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author