zsh-snap icon indicating copy to clipboard operation
zsh-snap copied to clipboard

Aliases definitions executed by `znap eval` can mess up code later on

Open lazywei opened this issue 1 year ago • 5 comments

Describe the bug

When I add this line in my .zshrc

znap eval zoxide 'zoxide init zsh --cmd cd'

znap status gives the following errors:

~ ❯ znap status 
zoxide: zoxide: no match foundno match found

""zszsh-snap": hNo such file or directory- (os error a2u)t
osuggestions": No such file or directory (os error 2)
 zoxide: no match found
zoxide: no match found
 %                                                                  

Steps To Reproduce

As mentioned above

Expected behavior

znap status should be able to list the repos

Environment:

  • OS: macOS
  • Terminal: Kitty
  • Zsh version: 5.9
  • Repo version: 97e9904

Additional context

Errors are gone if I switch back to the plain eval

eval "$(zoxide init zsh --cmd cd)"

I wonder if this is because the way I'm using znap eval is incorrect and that leads to the zoxide not being correctly initialized?

lazywei avatar Dec 26 '22 08:12 lazywei