Skip to content
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: how to add newlines to body #268

Open
1 of 4 tasks
Tapppi opened this issue Feb 6, 2018 · 4 comments
Open
1 of 4 tasks

prompt: how to add newlines to body #268

Tapppi opened this issue Feb 6, 2018 · 4 comments

Comments

@Tapppi
Copy link
Member

Tapppi commented Feb 6, 2018

There seems to be no way of adding newlines to the body of the commit. No way to really use for long commit messages as is, since a one line huge body isn't that nice.

Expected Behavior

Shift+enter or \n should work.

Even better would be auto wrapping to say 80 characters, so that one could write it out naturally, but the prompt would cut it down to lines.

Current Behavior

Enter (and shift+enter) submits and \n gets printed as is 😢

Affected packages

  • cli
  • core
  • prompt
  • config-angular
@marionebl
Copy link
Contributor

Yep, currently @commitlint/prompt does not support multiline input.

The thing with multiline editing is that it is very hard to scope this properly - when thinking things through you reach the feature set of a general purpose text editor.

That being said I guess we could come up with some scheme to allow for multiline output on a single line input (as your suggestions imply).

Personally I held back with changes on @commitlint/prompt due to #86

@fahrradflucht
Copy link

fahrradflucht commented Mar 11, 2018

@marionebl Shouldn't auto-wrapping on spaces work with vorpal?

Edit:
Sorry just read your comment more carefully. You already said that \n or other forms of doing it on single line should work.

@jjangga0214
Copy link

jjangga0214 commented Aug 6, 2021

Here I have an interest in this. Any update?

@raul1991
Copy link

raul1991 commented May 4, 2022

So should I, for now, disable the "body-leading-blank" property in my config ?

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

No branches or pull requests

5 participants