From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2683 invoked by alias); 8 Oct 2017 10:57:54 -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: 22922 Received: (qmail 1408 invoked by uid 1010); 8 Oct 2017 10:57:54 -0000 X-Qmail-Scanner-Diagnostics: from spyke.necoro.eu 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(185.11.136.146):SA:0(-1.9/5.0):. Processed in 2.451683 secs); 08 Oct 2017 10:57:54 -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 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: lists@necoro.eu X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: Alias named '=' To: Vincent Bernat Cc: Zsh Users References: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu> From: =?UTF-8?Q?Ren=c3=a9_Neumann?= Message-ID: <7d8ab2fa-3130-1e43-8807-f94025fd62ed@necoro.eu> Date: Sun, 8 Oct 2017 12:57:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Am 08.10.2017 um 10:29 schrieb Vincent Bernat: > ❦ 8 octobre 2017 10:03 +0200, René Neumann : > >> 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 =' > Ah, thanks! That worked. - René