zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.89k stars 125 forks source link

[bug]: (eval):25: defining function based on alias `zi' (eval):25: parse error near `()' #473

Open briandunn opened 1 year ago

briandunn commented 1 year ago

What happened?

On start of new shell

(eval):25: defining function based on alias `zi'
(eval):25: parse error near `()'

Steps to reproduce

  1. install zinit the automated way
  2. start a new shell

Relevant output

(eval):25: defining function based on alias `zi'
(eval):25: parse error near `()'

Screenshots and recordings

No response

Operating System & Version

OS: linux-gnu | Vendor: ubuntu | Machine: x86_64 | CPU: x86_64 | Processor: x86_64 | Hardware: x86_64

Zsh version

zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

Reverting to tag v3.7.0 makes it go away.

Code of Conduct

vladdoster commented 1 year ago

@briandunn,

This is a common issue due to Zoxide defining the zi alias. I looked at your dotfiles and it looks like you recently added Zoxide.

Can you confirm the error occurs without Zoxide?

sarpuser commented 2 months ago

Is there a way to remove the alias from Zoxide? Is that alias created when I call eval "$(zoxide init zsh)" from within .zshrc? How can I get around this issue if I wish to still use Zoxide but without that alias?

pschmitt commented 2 months ago

Is there a way to remove the alias from Zoxide?

zoxide init --no-cmd zsh
sarpuser commented 2 months ago
zoxide init --no-cmd zsh

So it looks like this flag is actually --no-aliases(as of the latest version on Debian). That being said, it does not get rid of the (eval):25: defining function based on alias 'zi' error. Interestingly, the second part of the original error, (eval):25: parse error near '()' is now gone. Any ideas?