Thayne
Thayne

Reputation: 7012

"command not found" on tab completion for "bat" in zsh

Normally, when I use tab complete for a program that doesn't have completion defined, it will just default to completing on files. However, with the bat command I get something that looks like this:

1010 ⮚ bat (eval):1: command not found: _bat
(eval):1: command not found: _bat
(eval):1: command not found: _bat
(eval):1: command not found: _bat
bat

How can I get it to complete with files like it does for other programs?

Relevant part of my zsh config:

zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' format '%F{blue}%d%f'
zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u'
zstyle ':completion:*' menu select yes interactive
zstyle ':completion:*' select-prompt %SAt %p%s
zstyle ':completion:*' group-name ''
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.cache/zsh
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors
zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 2 numeric
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,%cpu,tty,cputime,cmd"

Upvotes: 2

Views: 6382

Answers (1)

rohith vishaal
rohith vishaal

Reputation: 161

I don't know which distro you are using but the official Debian one had to rename the bat executable to batcat.

Upvotes: 9

Related Questions