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

fix(term_preview): bad bat command generation #3256

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

jamestrew
Copy link
Contributor

Using bat would result in the command being a nested list.

eg. using :Telescope plaents with bat installed

{
  "bat",
  { "--pager", "less -RS" },
  "--style=plain",
  "--color=always",
  "--paging=always",
  "--",
  "/home/jt/projects/telescope.nvim/data/memes/planets/earth",
}

This would cause vim.fn.termopen to throw an error as the command is expected to be a flat list or string.

Using `bat` would result in the command being a nested list.

eg. using `:Telescope plaents` with `bat` installed
```
{
  "bat",
  { "--pager", "less -RS" },
  "--style=plain",
  "--color=always",
  "--paging=always",
  "--",
  "/home/jt/projects/telescope.nvim/data/memes/planets/earth",
}
```

This would cause `vim.fn.termopen` to throw an error as the command is
expected to be a flat list or string.
@jamestrew jamestrew merged commit cac2494 into nvim-telescope:master Aug 15, 2024
12 checks passed
@jamestrew jamestrew deleted the fix/bat-previewer branch August 15, 2024 01:44
@jamestrew jamestrew added the backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat) label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant