Skip to content

Remove space at the beginning of a message #151

Description

@kozzza

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions