Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bash opened this issue Aug 18, 2024 · 0 comments · Fixed by #3075
Closed

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

bash opened this issue Aug 18, 2024 · 0 comments · Fixed by #3075
Labels
bug Something isn't working

Comments

@bash
Copy link
Contributor

bash commented Aug 18, 2024

(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

@bash bash added the bug Something isn't working label Aug 18, 2024
@bash bash changed the title Shell auto completion for --theme list the default theme incorrectly Shell auto-completion for --theme list the default theme incorrectly Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant