{"action":"created","issue":{"url":"https://api.github.com/repos/magmax/python-inquirer/issues/42","repository_url":"https://api.github.com/repos/magmax/python-inquirer","labels_url":"https://api.github.com/repos/magmax/python-inquirer/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/magmax/python-inquirer/issues/42/comments","events_url":"https://api.github.com/repos/magmax/python-inquirer/issues/42/events","html_url":"https://github.com/magmax/python-inquirer/issues/42","id":310833683,"number":42,"title":"Prompt gets cut off if too long","user":{"login":"alichtman","id":20600565,"avatar_url":"https://avatars2.githubusercontent.com/u/20600565?v=4","gravatar_id":"","url":"https://api.github.com/users/alichtman","html_url":"https://github.com/alichtman","followers_url":"https://api.github.com/users/alichtman/followers","following_url":"https://api.github.com/users/alichtman/following{/other_user}","gists_url":"https://api.github.com/users/alichtman/gists{/gist_id}","starred_url":"https://api.github.com/users/alichtman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alichtman/subscriptions","organizations_url":"https://api.github.com/users/alichtman/orgs","repos_url":"https://api.github.com/users/alichtman/repos","events_url":"https://api.github.com/users/alichtman/events{/privacy}","received_events_url":"https://api.github.com/users/alichtman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-03T13:20:06Z","updated_at":"2018-04-03T14:31:08Z","closed_at":null,"author_association":"NONE","body":"<img width=\"902\" alt=\"screen shot 2018-04-03 at 8 14 56 am\" src=\"https://user-images.githubusercontent.com/20600565/38251624-99e97830-3717-11e8-93ac-99f9a7c6310e.png\">\r\n\r\nI looked through the documentation and didn't see a workaround for this. Do you have any suggestions?"},"comment":{"url":"https://api.github.com/repos/magmax/python-inquirer/issues/comments/378270713","html_url":"https://github.com/magmax/python-inquirer/issues/42#issuecomment-378270713","issue_url":"https://api.github.com/repos/magmax/python-inquirer/issues/42","id":378270713,"user":{"login":"alichtman","id":20600565,"avatar_url":"https://avatars2.githubusercontent.com/u/20600565?v=4","gravatar_id":"","url":"https://api.github.com/users/alichtman","html_url":"https://github.com/alichtman","followers_url":"https://api.github.com/users/alichtman/followers","following_url":"https://api.github.com/users/alichtman/following{/other_user}","gists_url":"https://api.github.com/users/alichtman/gists{/gist_id}","starred_url":"https://api.github.com/users/alichtman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alichtman/subscriptions","organizations_url":"https://api.github.com/users/alichtman/orgs","repos_url":"https://api.github.com/users/alichtman/repos","events_url":"https://api.github.com/users/alichtman/events{/privacy}","received_events_url":"https://api.github.com/users/alichtman/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T14:31:08Z","updated_at":"2018-04-03T14:31:08Z","author_association":"NONE","body":"I wrote a quick workaround for it. I'm also using `colorama` and this works:\r\n\r\n```python\r\ndef prompt_yes_no(top_line=\"\", bottom_line=\"\",):\r\n\t\"\"\"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.\"\"\"\r\n\r\n\tif top_line is not \"\":\r\n\t\tprint(Fore.GREEN + Style.BRIGHT + \" \" + top_line)\r\n\r\n\tquestions = [ inquirer.List('choice',\r\n\t                            message=Fore.GREEN + Style.BRIGHT + bottom_line + Fore.YELLOW,\r\n\t                            choices=[' Yes', ' No'],\r\n\t                            ),\r\n\t]\r\n\r\n\tanswers = inquirer.prompt(questions)\r\n\r\n\tif answers.get('choice').strip() == 'Yes':\r\n\t\treturn True\r\n\telse:\r\n\t\treturn False\r\n```\r\n\r\nFeel free to add this to the documentation. I think many people (myself included) would have found this tip helpful."}}
{"actor":{"display_login":"alichtman"}}