commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter
http://commitizen.github.io/cz-cli/
MIT License
16.84k stars 553 forks source link

longer description how to new line? #580

Open GHJayce opened 6 years ago

GHJayce commented 6 years ago

Provide a longer description of the change: (press enter to skip)

Pressing the Enter key will proceed to the next question, not a line break.

Have you encountered a similar situation with me, is there a solution?

wangjiancn commented 5 years ago

\n

GHJayce commented 5 years ago

thanks. It works, If this example is the same, I still find it difficult to write long descriptions.

in-in commented 5 years ago

I also wonder how to break the string for the description field while typing Symbol \ and \n didn't work for me

The \ symbol works in the terminal, but not in the cz-cli prompt

⇒ echo foo\ 
> bar           
foobar
realduolaf commented 5 years ago

Symbol \ and \n didn't work in my terminal, too.

I find the issue #398 . But do you have any plans to provide a more convenient way?

PaulRBerg commented 5 years ago

+1 for this.

A solution would be to just skip the long description prompt and then do git commit --amend to open the vim editor.

akakoori commented 5 years ago

+1 This is somewhat annoying , and I think it departs from the aim of this tool, which is to make committing easy.

hydra1983 commented 5 years ago

+1

tvvignesh commented 4 years ago

Bump. This is difficult to handle. \n did not work for me as well. Can you help or let us know if there is any fallback till this is taken up? Thanks.

RichieMerchant commented 4 years ago

I use git commit -e and edit the message before the commit fires.

CanRau commented 1 year ago

another option is

git commit -m "first line (subject)" -m "body" -m "more body (new paragraph)" -m "footer"

git commit -e is also very helpful, but defining multiple -m messages you don't even need to wait for your editor to open the file etc 😉

ImagineBoom commented 1 year ago

git cz -e

geoffreyvanwyk commented 10 months ago

Based on #398, if you change "input" to "editor" on line 126 in node_modules/cz-conventional-changelog/engine.js for the 'body' variable, when prompted for the body, you can press "Enter" and your editor will open wherein you can enter the body.

Therefore, the issue is actually with repository https://github.com/conventional-changelog/conventional-changelog. This issue can be closed.