CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 236 forks source link

Color the questions with different colors #89

Open tede12 opened 4 years ago

tede12 commented 4 years ago

How can I change color on different questions?

from colorata import Fore
choice = prompt([
            {
                'name': 'start',
                'type': 'list',
                'message': 'Which pizza would you like?',
                'choices': [
                     'Margherita',
                     'Pepperoni and cheese',
                     'Mozzarella',
                     f'{Fore.RED}Exit{Fore.RESET}'  
               ]
            }
        ], style=default_style)['start']

why this line f'{Fore.RED}Exit{Fore.RESET}' is not interpreted? (it is represented like this ^[[31mExit^[[39m) How can I change color on a single question?

CITGuru commented 4 years ago

I dont think thats supported at the moment