Open arossert opened 2 years ago
Hi @arossert ,
As of the current release, this feature does not exist yet. Thanks for raising it, I'll include this in the next release.
For changing a specific part of the string, it won't happen for Choice
(it'll only for the entire choice), but for color_print
, you essentially have to break your characters into multiple tuples. E.g. printing hello world
color_print(formatted_text=[("blue", "hel"), ("red", "lo"), ("", " "), ("green", "wor"), ("yellow", "ld")])
Thanks, Kevin
@kazhala thanks for the quick response. even changing the whole choice text will be good, I did tried to look at how fuzzy prompt color part of the text in a different color as you search (it mark the found characters in pink) but I got lost ☺️
I'm using the fuzzy prompt to list EC2 instances, the choices are a list of
Choice
with a value and name, the name is in this formatI want that the running/stopped will be in green/red colors, is it possible to change the color of the line based on the status? Also is it possible to only change this specific part of the string to a different color? I looked at
color_print
but couldn't find a way using it.