Skip to content

bat - filename completion script issue with init_completion error #2066

@maximillianus

Description

@maximillianus

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=<not set>
LESS=<not set>
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
BAT_PAGER=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
XDG_CONFIG_HOME=<not set>
XDG_CACHE_HOME=<not set>
COLORTERM=truecolor
NO_COLOR=<not set>
MANPAGER=<not set>

Config file

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

Compile time information

  • Profile: release
  • Target triple: x86_64-apple-darwin
  • Family: unix
  • OS: macos
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2,sse3,ssse3
  • Host: x86_64-apple-darwin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions