[Feature Request] Add --verbose option
See original GitHub issueHi @carloscuesta!
I love gitmoji
and gitmoji-cli
. Thank you for making it happen.
I have my own pre-commit hook that makes changes to files and messages the user in the process, so that there’s a record and some awareness of what’s changed.
I’ll admit the way I do it is a bit hacky; I know R far better than I know bash, so I have the pre-commit hook call R to run a script. But it gets the job done, and it also messages the user about it.
That is to say, when I use a simple git commit
it messages the user. But when I use gitmoji-cli -c
, there is no messaging.
I think maybe the messaging ends up in stderr
. For example, I tested what would happen if I had my pre-commit hook always exit with non-zero status. I learned via that test that at least the hook was working… but I also saw my R messaging come through in stderr
. But when I changed it to exit successfully, alas, I lost my messaging.
Is there a way to get that back? As I suggested in the title, maybe a --verbose
or -v
option?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (11 by maintainers)
From a quick look into it, execa support to disable the output buffer, to stream the process, tested in a quick POC, adding thoses options seems to do the trick (redirecting the stdout stream to the current process, might need a more careful approach with stdin):
I will probably create a execa wrapper with the correct options for usage within gitmoji-cli when we want to display stdout (hook and commit modes)
basically:
buffer option: https://github.com/sindresorhus/execa#buffer