zsh-users
 help / color / mirror / code / Atom feed
From: "René Neumann" <lists@necoro.eu>
To: Vincent Bernat <bernat@luffy.cx>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Alias named '='
Date: Sun, 8 Oct 2017 12:57:43 +0200	[thread overview]
Message-ID: <7d8ab2fa-3130-1e43-8807-f94025fd62ed@necoro.eu> (raw)
In-Reply-To: <m360bqt54h.fsf@luffy.cx>

Am 08.10.2017 um 10:29 schrieb Vincent Bernat:
>  ❦  8 octobre 2017 10:03 +0200, René Neumann <lists@necoro.eu> :
> 
>> 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é


  reply	other threads:[~2017-10-08 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08  8:03 René Neumann
2017-10-08  8:29 ` Vincent Bernat
2017-10-08 10:57   ` René Neumann [this message]
2017-10-08 18:37     ` Daniel Shahaf
2017-10-08 22:37       ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d8ab2fa-3130-1e43-8807-f94025fd62ed@necoro.eu \
    --to=lists@necoro.eu \
    --cc=bernat@luffy.cx \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).