alexherbo2 / kakoune.cr

A command-line tool for Kakoune
https://kakoune.org
The Unlicense
54 stars 11 forks source link

Problem with `bat` preview in `kcr-fzf-buffers` #4

Closed loewenheim closed 3 years ago

loewenheim commented 3 years ago

bat has a problem with file paths containing ~, at least when they're quoted as in the kcr-fzf-buffers script. This results in the problem in the attached screenshot.

Bildschirmfoto 2021-03-01 um 16 20 01
alexherbo2 commented 3 years ago

It could be nice to have a command to get a buffer content.

Kakoune has a -buffer switch to evaluate-commands and execute-keys.

We could add a context for buffers and use the write command to pipe to a fifo.

alexherbo2 commented 3 years ago

In a connected terminal, you can now do kcr cat --raw to get the content of the current buffer, or explicitly pass a buffer list to get their content.