skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.
MIT License
2.94k stars 137 forks source link

z.lua conflicts with oh-my-posh #195

Open Sh00Fly opened 6 months ago

Sh00Fly commented 6 months ago

There is a conflict between oh-my-posh and z.lua. When oh-my-posh is running z.lua stops updating it's database. I have no idea what is going on there, but I found an issue opened on oh-my-posh github: https://github.com/JanDeDobbeleer/oh-my-posh/pull/2105

I discovered that if I manually change default value of _ZL_CLINK_PROMPT_PRIORITY from 99 to 0 in z.lua file then it starts working.

Like that: local _zl_clink_prompt_priority = os.environ("_ZL_CLINK_PROMPT_PRIORITY", 0)

themql commented 5 months ago

maybe you put the z.lua init command before oh-my-posh in your profile. I encountered the same problem, but after I adjusted the order of initialization and initialized omp first, z.lua and its database worked normally.