cz-cli icon indicating copy to clipboard operation
cz-cli copied to clipboard

longer description how to new line?

Open GHJayce opened this issue 6 years ago • 12 comments

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?

GHJayce avatar Oct 15 '18 10:10 GHJayce

\n

wangjiancn avatar Jan 09 '19 00:01 wangjiancn

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

GHJayce avatar Jan 09 '19 04:01 GHJayce

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

in-in avatar Feb 12 '19 12:02 in-in

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?

realduolaf avatar Apr 13 '19 09:04 realduolaf

+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.

PaulRBerg avatar Apr 23 '19 13:04 PaulRBerg

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

akakoori avatar May 05 '19 08:05 akakoori

+1

hydra1983 avatar May 28 '19 09:05 hydra1983

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.

tvvignesh avatar Apr 24 '20 14:04 tvvignesh

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

RichieMerchant avatar Jun 05 '20 10:06 RichieMerchant

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 😉

CanRau avatar Jan 05 '23 03:01 CanRau

git cz -e

ImagineBoom avatar Mar 15 '23 10:03 ImagineBoom

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.

geoffreyvanwyk avatar Jan 04 '24 20:01 geoffreyvanwyk