Closed goodevilgenius closed 3 years ago
Hello @goodevilgenius
Thanks for opening an issue 😊
I think that the --print
command won't be a really great addition to the cli, since the purpose of it would be to handle a really specific use-case.
I know this is not ideal but If you want to keep using gitmoji
on the repo that is not compatible with git-svn
what about using the gitmoji --search
command to find the emoji that you're looking for?
You can use it like this:
gitmoji --search "text to search"
or gitmoji -s "text to search"
What do you think?
Not really ideal at all. I was hoping to be able to use the already existing interactive commit message workflow.
But, at least to get the emoji, I can hack together something like:
gitmoji -l | fzf | awk -F ' ' '{print $1}'
That will give me an interactive search with fzf, and using awk to get just the emoji from the output.
I could possibly combine that with a previous input. Something like:
read -p 'Keyword emoji search? ' keyword
gitmoji -s "$keyword" | fzf | awk -F ' ' '{print $1}'
It's still really awkward, especially since gitmoji
by itself already has the exact interface I need.
If you're not willing to work on it, would you be open to a PR adding the functionality? I'm pretty sure I could build that myself.
I'm not quite sure that I'll be accepting a PR for that, because as I said I don't think it is a great addition to the functionality of the cli itself. I think it solves an edge case and outside of this edge case the --print
command won't be used at all
Hello @carloscuesta!
Issue: My job requires me to use subversion, and I'd really like to use gitmoji with svn. I normally use
git-svn
, but one of our repos has some weirdness that only works with the official subversion client.I wanted to create a script that I could use that would call
gitmoji
to create the commit message, and pass it tosvn commit
. However,gitmoji --hook
callsgit rev-parse
which fails outside of a git repo. Andgitmoji --commit
obviously callsgit commit
directly.I propose an option, something like
gitmoji --print
which would print the resulting commit message to stdout, andgitmoji --print --file <filename>
which would write the commit message to<filename>
.OS: Linux Mint gitmoji -v: 3.2.15 Node version: 12.10.0 (although I can switch to any other version)