Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Alias named '='
Am 08.10.2017 um 10:29 schrieb Vincent Bernat:
> ❦ 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 ='
>
Ah, thanks! That worked.
- René
Messages sorted by:
Reverse Date,
Date,
Thread,
Author