-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prompt gets cut off if too long #42
Comments
I'm afraid there isn't. Maybe it should manage two lines, but currently it cannot. |
I wrote a quick workaround for it. I'm also using def prompt_yes_no(top_line="", bottom_line="",):
"""Print question (split into top and bottom lines) and return True or False
depending on user selection from list. bottom_line should be used for one liners,
with an empty top_line. Otherwise, bottom_line is the second line you want printed."""
if top_line is not "":
print(Fore.GREEN + Style.BRIGHT + " " + top_line)
questions = [ inquirer.List('choice',
message=Fore.GREEN + Style.BRIGHT + bottom_line + Fore.YELLOW,
choices=[' Yes', ' No'],
),
]
answers = inquirer.prompt(questions)
if answers.get('choice').strip() == 'Yes':
return True
else:
return False Feel free to add this to the documentation. I think many people (myself included) would have found this tip helpful. |
This is causing me problems as well. I believe that the I would put up a PR, but I read through the code briefly and I'm just not sure where best to test it as a general solution. Any insight into the code base would be helpful. Thanks! |
Notably, this bug even occurs when you wrap the text yourself, because the code doesn't include newlines in the text length check. |
Correct, that's why my workaround looks so jank. 🤷 |
This is pretty key functionality. Putting in a vote that this would be a great new feature. |
Wish this was fixed, this seems like pretty common issue; just registering my vote. |
I looked through the documentation and didn't see a workaround for this. Do you have any suggestions?
The text was updated successfully, but these errors were encountered: