knqyf263 / pet

Simple command-line snippet manager
MIT License
4.44k stars 223 forks source link

How to enable color when using the function pet-select ZSH function? #195

Closed progS1m closed 7 months ago

progS1m commented 2 years ago

I've tried to add --color option to the pet-select ZSH function but it does change nothing and the color do not appear. Tried two variants (.zshr) :

...
function pet-select() {
--
130 | BUFFER=$(pet search --color --query "$LBUFFER")
...

or

...
function pet-select() {
--
130 | BUFFER=$(pet search --query "$LBUFFER" --color)
...

Using the pet search --color brings the colorized version.

lrworth commented 1 year ago

I see the same thing in bash. Running pet search --color displays coloured output, but $(pet search --color) does not.