''❯1.10.3export VIRTUAL_ENV_DISABLE_PROMPT=12typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f
%}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f 'I have:
If I put /usr/local/bin in my PATH in zsh, the git portion of the pure prompt ceases to work. I don't get the branch name or the dirty flag in the prompt.
I can't for the life of me figure out what might be causing it to break.
Can you offer any advice? I'd very much appreciate your insights.
I did add the line suggested in #435 to prompt_pure_setup and running /usr/local/bin/zsh -x I do see remarkably different output when /usr/local/bin is in the path, but I don't see a
The contents of /usr/local/bin is controlled entirely by Homebrew. My installed packages are: https://gist.github.com/ianchesal/1623c8d1ada5262b934b1019df189183
I've tried using /bin/zsh and /usr/bin/git by simply doing a brew remove zsh git but the problem persists. It's something in /usr/local/bin that's messing this up but I can't for the life of me figure out what it might be.
With /usr/local/bin in my PATH here is what I see:

Without /usr/local/bin in my PATH here is what I see:

.zshrc:I can recreate the problem with the ultra-minimal .zshrc:
autoload -Uz compinit
compinit
export PATH=/usr/local/bin:${PATH}
autoload -U promptinit
promptinit
prompt pure
I wiped Homebrew, reinstalled it and then did an ultra-minimal package install of:
❯ brew list --versions
gettext 0.20.1
git 2.22.0_1
jemalloc 5.2.0
libtermkey 0.22
libuv 1.30.1
libvterm 726
luajit 2.0.5
msgpack 3.2.0
ncurses 6.1
neovim 0.3.8
pcre 8.43
pcre2 10.33
unibilium 2.0.0
zsh 5.7.1
And _now_ the prompt is working correctly. So it's a package in my Homebrew list that's causing it to break. I'll add them back one and at a time and see which one it is.
Well, I'm stumped. I went package by package, re-installing and test the zsh prompt in a fresh shell along the way and it works just fine. No issues at all. Something must have gotten messed up in Homebrew package land but I can't for the life of me figure out what it was.
Finally figured it out: it was the cat function I had made that swaps out cat for bat if it's installed (and it was). Using bat in place of cat prevents the git branch and dirty status from working in the prompt.
Leaving this comment as a breadcrumb for people from the future.
Most helpful comment
Finally figured it out: it was the
catfunction I had made that swaps outcatfor bat if it's installed (and it was). Usingbatin place ofcatprevents the git branch and dirty status from working in the prompt.Leaving this comment as a breadcrumb for people from the future.