From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8256 invoked by alias); 8 Oct 2017 08:37:16 -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: X-Seq: 22921 Received: (qmail 10578 invoked by uid 1010); 8 Oct 2017 08:37:16 -0000 X-Qmail-Scanner-Diagnostics: from bart.luffy.cx by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(78.47.78.131):SA:0(-1.9/5.0):. Processed in 1.259307 secs); 08 Oct 2017 08:37:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: bernat@luffy.cx X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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= From: Vincent Bernat To: =?utf-8?Q?Ren=C3=A9?= Neumann Cc: Zsh Users Subject: Re: Alias named '=' References: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu> Date: Sun, 08 Oct 2017 10:29:02 +0200 In-Reply-To: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu> (=?utf-8?Q?=22Ren=C3=A9?= Neumann"'s message of "Sun, 8 Oct 2017 10:03:52 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E2=9D=A6 8 octobre 2017 10:03 +0200, Ren=C3=A9 Neumann = =C2=A0: > I stumbled upon the idea to define a function '=3D' 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 '=3D'=3D'noglob =3D' > > 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'=3D'noglob =3D' > do not work. I am using "c" instead of "=3D", but you can use "=3D" with: aliases[=3D]=3D'noglob =3D' --=20 Use the "telephone test" for readability. - The Elements of Programming Style (Kernighan & Plauger)