Skip to content

How to type multiple lines for body part? #6

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

Closed
WqyJh opened this issue Nov 4, 2018 · 6 comments
Closed

How to type multiple lines for body part? #6

WqyJh opened this issue Nov 4, 2018 · 6 comments

Comments

@WqyJh
Copy link

WqyJh commented Nov 4, 2018

I was trying to type multiple lines for body part, but when I type the Enter key it moved to footer part, which means that I could only type one line for body part.
So I was wondering how to change lines when typing for the body part.

@woile
Copy link
Member

woile commented Nov 5, 2018

hey there's no current support for this unfortunately. I will implement something to not escape the new line symbol. It'll be possible to do My body \n is great.

Eventually I'll try to migrate to the new python-prompt-toolkit 2.0.0 and we'll see if it possible to use something like shift + Enter.

Meanwhile you can modify the body with git commit --amend

@WqyJh
Copy link
Author

WqyJh commented Nov 5, 2018

Well, thank you for reply. I think git commit --amend is a good way of doing this.

@televi
Copy link

televi commented Jan 9, 2019

Have you considered switching from whaaat to PyInquirer? In addition to supporting the latest versions of the prompt-toolkit, it support the editor type so that users can enter multiple lines of text via their favorite editor. I can git that a shot if you'd like an submit a pull request if I get it working. The developer for whaaat seems to have no time at present to maintain that project while PyInquirer is still active (https://github.com/CITGuru/PyInquirer).

@woile
Copy link
Member

woile commented Jan 9, 2019

I'm moving to questionary. It had support for prompt toolkit 2 and is maintained.

https://github.com/tmbo/questionary

Wil check if it's possible to multi line.

Edit: pr here #9

@Lee-W
Copy link
Member

Lee-W commented Nov 12, 2019

As I tested, it seems commitizen doesn't support multiple line input yet.

After reading python-prompt-toolkit::multiline-input, it does not seem to be a good solution to me.

How about implement it like cz-cli?

Provide a LONGER description of the change (optional). Use "|" to break new line:

@woile
Copy link
Member

woile commented Nov 12, 2019

Seems like a valid option. I'd give it a try, it may not be the best, but it's something to start with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants