Skip to content

Shell auto-completion for --theme list the default theme incorrectly #3073

Closed
@bash

Description

@bash

(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 Add helper scripts for testing the shell completions #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

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