After doing a brew upgrade bat to get version 0.10.0, when I try to tab complete a filename, I get the error output "(eval):1: command not found: _bat" (and it prints 3 times)
Using:
Mac OSX
iTerm2 3.2.7
zsh 5.3 (x86_64-apple-darwin18.0)
bat 0.10.0
I'm not sure how to debug this further, any input or guidance would be appreciated
Thank you for the feedback.
There shouldn't be any shell completion files for bat 0.10 (see release notes). Maybe you just have to restart your terminal? If that doesn't help, could you please check if there is a _bat shell completion file left somewhere on your system?
I had the same problem. I believe the issue is that the completion file is cached by zsh but then it cannot find it. Try checking in ~/.zcompdump and delete the line with _bat. That worked for me. (You may also need to delete the compiled version ~/.zcompdump.cmp)
I had this problem as well and @lavifb's comment above helped.
Thanks @lavifb That worked for me.
For me the bug is still present even after purging the .zcompdump files.
Same, unfortunately 馃檨 - deleted the .zcompdump file and just the line with _bat and neither worked.
@nshtg @garymh You're supposed to restart your shell after deleting.
Make sure to restart your shell after deleting the files. Also make sure you have the latest version of bat.
If the problem persists could you tell us your OS, zsh, versions as above along with how you installed/upgraded bat? That way we can better help troubleshoot your issue.
@lavifb
I did restart the shell ofc.
OS: MacOS Mojave
ZSH: zsh 5.7.1 (x86_64-apple-darwin18.2.0)
bat was installed using homebrew.
Restarted the shell as well. I have the exact same setup as @nshtg actually. Maybe its homebrew related?
Well I also used homebrew and I would guess most Mac users also do too. My guess it has something to do with any zsh frameworks you might be using. Either it is setting a different file from ~/.zcompdump and ~/.zcompdump.cmp. You should check out your .zshrc or other config files for compinit -d <dumpfile>. You may also want to try reseting whatever zsh framework you are using if you are using one.
https://github.com/sharkdp/bat/issues/503#issuecomment-462172417 works! Cheers!
Homebrew installation, no ~/.zcompdump entry, restarted shell, tried brew reinstall bat still problematic.
What about this:
You may also need to delete the compiled version ~/.zcompdump.cmp
Sorry, forgot to mention, yeah to no avail.
Maybe this comment https://github.com/sharkdp/bat/issues/503#issuecomment-469044789 by @lavifb can help.
You could try to search your home folder for files containing _bat. With rg or ag:
rg -uu '\b_bat\b' ~
ag -uu '\b_bat\b' ~
_"Maybe this comment #503 (comment) by @lavifb can help."_
Read it, yet had no luck figuring out where to look 馃槬
_"You could try to search your home"_
I'm only finding these github notification emails and well, few mp3 files! :))
Appreciate your help anyway.
_"You could try to search your home"_
I'm only finding these github notification emails and well, few mp3 files! :))
then maybe search root? that error message has to come from somewhere :smile:
Huh!
/usr/local/opt/zplug/.zcompdump
Guess because zplug was homebrew-installed. Really appreciate the help.
For me it was
# not a dotfile
/usr/local/opt/zplug/zcompdump
that had the offending entry. Thanks for all of your help!
Most helpful comment
I had the same problem. I believe the issue is that the completion file is cached by zsh but then it cannot find it. Try checking in
~/.zcompdumpand delete the line with_bat. That worked for me. (You may also need to delete the compiled version~/.zcompdump.cmp)