sharkdp/bat

Shell auto-completion for `--theme` list the default theme incorrectly

Closed this issue · 0 comments

bash commented

(not at all severe)

When using auto-complete to complete the default theme in any shell with supported completions (I've tested fish, zsh and bash) the default theme is completed as Monokai Extended (default) instead of Monokai Extended.

This is because the completion scripts use bat --list-themes | cat to get the list of themes.
#2937 changed the basic output to include the (default) suffix which breaks the completions.


What steps will reproduce the bug?

  1. Start bash, fish or zsh with bat's completions installed. See #3072
  2. Type bat --theme Monokai\ Extended and trigger auto-complete (press tab)

What happens?

The suggestions include Monokai Extended (default) (not a valid theme name)

What did you expect to happen instead?

The suggestions should include Monokai Extended instead.

How did you install bat?

From source: b662fec