jesseduffield / lazygit

simple terminal UI for git commands
MIT License
47.94k stars 1.72k forks source link

Add command to the commit message menu to paste a message from the clipboard #3672

Closed stefanhaller closed 5 days ago

stefanhaller commented 2 weeks ago

Pasting a commit message into the commit message panel is cumbersome, because you need to paste the subject into the upper field and the body into the lower field. Having copied a commit message using y m, the clipboard contains both, so there's no easy way to get the subject and body into their respective fields.

Pasting the whole thing into the subject field is especially problematic, see #3151. Pasting it into the description field is a little better, but then you still need to cut the subject line from the description and paste it into the subject field.

It would be nice if the commit message menu (the one that you open with ctrl-o) had an entry "Paste commit message from clipboard" that splits the clipboard into subject and description and pastes both into their respective fields.

A few details to consider:

I'm putting a "good first issue" label on this, it doesn't seem very difficult to do.