Bat: Can't use Tab to auto complete the file path in the latest version on macOS.

Created on 2 Apr 2019  路  5Comments  路  Source: sharkdp/bat

I just upgraded bat on my Mac with brew update && brew upgrade, then the following error showed up when I want to complete the file name "Table.txt" using Tab.

xxx@MBP: ~$bat Ta
(eval):1: _bat: function definition file not found
(eval):1: _bat: function definition file not found
(eval):1: _bat: function definition file not found

Environment:
zsh 5.7.1

When I try on bash, completion function work well, maybe it is the problem about the variables named FPATH and fpath.

Reference:
https://unix.stackexchange.com/questions/120752/zsh-autocompletion-gives-seemingly-random-errors-after-some-time

Most helpful comment

After running rm ~/.zcompdump* and restarting the terminal, the completion work well now.

All 5 comments

After running rm ~/.zcompdump* and restarting the terminal, the completion work well now.

Is there a simple explanation for why this happens?

Is there a simple explanation for why this happens?

Older versions of rust shipped a "broken" bash completion file which needs to be removed from the cache.

After running rm ~/.zcompdump* and restarting the terminal, the completion work well now.

I tried this and it didn't work. Is there another solution? :( I'm running bat 0.11.0 and macOS 10.14.6

@mcjlnrtwcz Could you please try updating to the latest version of bat (and repeat the steps above)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joeycozza picture joeycozza  路  20Comments

Aankhen picture Aankhen  路  17Comments

ariasuni picture ariasuni  路  23Comments

beruic picture beruic  路  20Comments

rgwood picture rgwood  路  24Comments