bat - filename completion script issue with init_completion error · Issue #2066 · sharkdp/bat (original) (raw)

When I try to do autocomplete for the filename when using bat, I encounter init_completion issue. This happens in iTerm2. Strangely, in my regular terminal, it works fine. It happens the same to my regular terminal.

Let's say I am trying to use bat to check package.json.

This is what comes up after I click after typing bat pac

bat pac-bash: _init_completion: command not found

...

I would expect filename auto completion works fine in iTerm2 as it does in regular terminal.

...

I install bat using homebrew and using it on iTerm2.

iTerm version: iTerm2 Build 3.4.15


#### Software version

bat 0.19.0

#### Operating system

Mac OS X 10.15.7 (Darwin 19.6.0)

#### Command-line

```bash
bat -pp --diagnostic

Environment variables

SHELL=/bin/bash PAGER= LESS= LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 BAT_PAGER= BAT_CACHE_PATH= BAT_CONFIG_PATH= BAT_OPTS= BAT_STYLE= BAT_TABS= BAT_THEME= XDG_CONFIG_HOME= XDG_CACHE_HOME= COLORTERM=truecolor NO_COLOR= MANPAGER=

Config file

Could not read contents of '/Users/apradana/.config/bat/config': No such file or directory (os error 2).

Compile time information

Less version

> less --version
less 487 (POSIX regular expressions)
Copyright (C) 1984-2016  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less