mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Allow to customize color for CLI prompts
This commit is contained in:
parent
27afb4dc04
commit
808f6203fd
1 changed files with 3 additions and 2 deletions
|
@ -307,7 +307,7 @@ class MoulinetteSignals(object):
|
|||
return authenticator
|
||||
return self._authenticate(authenticator, help)
|
||||
|
||||
def prompt(self, message, is_password=False, confirm=False):
|
||||
def prompt(self, message, is_password=False, confirm=False, color='blue'):
|
||||
"""Prompt for a value
|
||||
|
||||
Prompt the interface for a parameter value which is a password
|
||||
|
@ -320,12 +320,13 @@ class MoulinetteSignals(object):
|
|||
- message -- The message to display
|
||||
- is_password -- True if the parameter is a password
|
||||
- confirm -- True if the value must be confirmed
|
||||
- color -- Color to use for the prompt ...
|
||||
|
||||
Returns:
|
||||
The collected value
|
||||
|
||||
"""
|
||||
return self._prompt(message, is_password, confirm)
|
||||
return self._prompt(message, is_password, confirm, color=color)
|
||||
|
||||
def display(self, message, style='info'):
|
||||
"""Display a message
|
||||
|
|
Loading…
Add table
Reference in a new issue