PyInquirer
PyInquirer copied to clipboard
Remove space at the beginning of a message
I've peeked the definition of the question method in PyInquirer prompts in hopes of finding a way to remove the space that proceeds a message:
def get_prompt_tokens(cli):
tokens = []
tokens.append((Token.QuestionMark, qmark))
tokens.append((Token.Question, ' %s ' % message))
if ic.answered:
tokens.append((Token.Answer, ' ' + ic.get_selection()[0]))
else:
tokens.append((Token.Instruction, ' (Use arrow keys)'))
return tokens
It seems the space is hardcoded into the question on the 5th line shown here. Is there anyway to get around that? I've already removed the question mark by passing in qmark as an arg into prompt like so:
prompt(prompt_dict, style=self.cli_style, qmark='')
Thank you.