jesseduffield / lazygit

simple terminal UI for git commands
MIT License
48.4k stars 1.74k forks source link

Support for gitmoji #1307

Open edwinclement08 opened 3 years ago

edwinclement08 commented 3 years ago

Is your feature request related to a problem? Please describe. Well, its a minor convenience right now, but feel that it would help a lot in standardizing commit messages. Would like to integrate gitmoji in the commit flow, based on a config flag.

Describe the solution you'd like Those who enable the feature can use the gitmoji cli within the commit window. Gitmoji-cli(https://github.com/carloscuesta/gitmoji-cli) already has a clear interactive flow. We can have a tab based form(like html) that can tab through gitmoji, scope, commit title, message

I understand this would be hard and time consuming to implement. Another way to do this is to use the git hooks feature of gitmoji. The hook is triggered on git commit. I believe this is something I myself can implement given some guidance.

Describe alternatives you've considered Currently, I am exiting lazygit and then committing in the shell before re-entering lazygit to push changes.

Additional context How Gitmoji CLI looks

gitmoji
jesseduffield commented 3 years ago

@edwinclement08 This sounds like a worthwhile feature. I don't think I'll be able to submit a PR for this anytime soon (others are welcome to though!) but you can access it from within lazygit via a customcommand which opens gitmoji in a subprocess. See the examples here: https://github.com/jesseduffield/lazygit/wiki/Custom-Commands-Compendium

edwinclement08 commented 3 years ago

Will check it out.

ShivamJoker commented 2 years ago

Hello any updates on this ? Would love to have this feature the least we can have is emoji displayed instead of just plain text

ablacklama commented 2 years ago

I'm a gitmoji user and in my case having the gitmoji hooks breaks the basic commit function. I enter my commit message and it just hangs and never completes. the offending gitmoji hook is prepare-commit-msg:

#!/bin/sh
# gitmoji as a commit hook
exec </dev/tty
gitmoji --hook $1 $2

It might be good to add general support for interactive prepare-commit-msg hooks like this, but a simple gitmoji fix would be nice as well.

kjvdven commented 5 months ago

Work around for Mac Users:

I have Raycast installed, which has a plugin for gitmoji. I have a shortcut for opening the gitmoji plugin and can search and add the gitmoji into the commit message in Lazygit. You don't have to leave the keyboard to do this.