skywind3000 / z.lua

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

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

Open Sh00Fly opened 12 months ago

Sh00Fly commented 12 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 10 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.