calc.plugin.zsh icon indicating copy to clipboard operation
calc.plugin.zsh copied to clipboard

invalid alias '=' encountered while printing aliases

Open jhrcook opened this issue 6 years ago • 4 comments
trafficstars

Hello,

I cloned the this repo to my $ZSH_CUSTOM/plugins/ folder and changed the directory name to "calc".

When I run source /Users/admin/.oh-my-zsh/custom/plugins/calc/calc.plugin.zsh, I am now able to use the plugin (which is awesome, by the way!). I have added this line to my .zshrc, but on the loading of my terminal (iTerm2), I get the following error and cannot run = 2+2.

/Users/admin/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh:31: invalid alias '=' encountered while printing aliases

However, if I then source the calc.plugin.zsh file manually (using the same command as above), I can then use the plugin.

Do you know how to fix this? I'm new to zsh and oh-my-zsh so I apologize if this is a newbie error. I am running macOS Mojave (v.10.14.4) on a 13" 2016 MacBook Pro.

Thank you, - Josh Cook

jhrcook avatar Aug 18 '19 18:08 jhrcook

I use Antigen plugin manager and I get the same error.

NickkoG avatar Sep 04 '19 08:09 NickkoG

Same error. @arzzen

Dentrax avatar Dec 11 '19 22:12 Dentrax

Related: zsh-users/zsh-syntax-highlighting#526

bqnguyen94 avatar Feb 11 '20 09:02 bqnguyen94

Hi, there is another alias instead of = 2+2 , you can use calc 2+2

arzzen avatar Mar 24 '21 07:03 arzzen

I had the same issue. Moving the calc plugin to be loaded last fixed it

JoshPaulie avatar Jan 30 '23 14:01 JoshPaulie

I had the same issue. Moving the calc plugin to be loaded last fixed it

That works 👍

Equationzhao avatar Sep 28 '23 16:09 Equationzhao

Sourcing this even as the last line in the file still doesnt fix it for me. Any other solutions? @Dentrax

p1r473 avatar Apr 30 '24 00:04 p1r473

Sorry @p1r473, I don't use this plugin anymore. (Don't use any alternative either)

Dentrax avatar Apr 30 '24 14:04 Dentrax