prezto icon indicating copy to clipboard operation
prezto copied to clipboard

Command cache malfunctioning

Open amokfa opened this issue 1 year ago • 3 comments

Description

Shell says command not found if it was installed recently.

Expected behavior

This shouldn't happen

Actual behavior

                               
└─❱❱❱ yarn install                                                                                                                                                                                                         130 ⏎   ─┘

Correct yarn to _yarn ? [nyae] %                                                                                                                                                                                                                                     
└─❱❱❱ which yarn                                                                                                                                                                                                           130 ⏎   ─┘
/home/amokfa/.config/nvm/versions/node/v18.16.0/bin/yarn
                                                                                                                                                                                                                                      
└─❱❱❱ yarn install                                                                                                                                                                                                                 ─┘

Correct yarn to _yarn ? [nyae] 

Steps to Reproduce

See above

Versions

  • Prezto commit: da87c79b3a35f5a4a504ea331e9ec52b4f786976
  • ZSH version: 5.8.1
  • OS information: popos

amokfa avatar Apr 22 '23 04:04 amokfa

If it's been installed recently (generally the current shell), this is expected behavior. You can tell zsh to re-create this cache by using hash -r. I hope this helps! Please let me know if that doesn't work for you.

belak avatar Apr 22 '23 06:04 belak

thanks a lot. however, I recently moved to prezto from oh my zsh and didn't remember that happening with their setup.

amokfa avatar Apr 22 '23 07:04 amokfa

Good to know! If we have the time we could look into how they do it.

belak avatar Apr 22 '23 07:04 belak