Skip to content

[FR] osc10/11 support in preview window #4317

Open
@phanen

Description

@phanen

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.60.3 (0012183)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Change a light background in terminal then do this with delta:

: | fzf --preview 'git show|delta'

You will find delta will use dark theme.
Image

That's because delta use osc10/11 to detect fg/bg color.

Although I can set --light/--dark in a "smart script wrapper" (e.g. fzf-lua) that can tell if we are in dark/light mode. I think if would be better if fzf is able to response to escape sequence.
Image

e.g. In nvim/vim we have autocmd: TermRequest from "child" and TermResponse from "host" (e.g. kitty).

Maybe fzf can have a similar concept as a "event".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions