dalance / termbg

A Rust library for terminal background color detection
Apache License 2.0
80 stars 5 forks source link

Detection fails if it's attempted to make use of the output #23

Open mavit opened 3 months ago

mavit commented 3 months ago

Let's say I want to call termbg from a shell script. With version 0.4.4, you can't:

$ termbg
Check terminal background color
  Term : XtermCompatible
  Latency: 1.256231ms
  Color: R=ffff, G=ffff, B=ffff
  Theme: Light
$ termbg | grep Theme
  Theme: detection failed Unsupported

In version 0.4.3, this used to say:

$ termbg | grep Theme
  Theme: Light