altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.74k stars 89 forks source link

Allow overriding commands arbitrarily, from the configuration file #61

Open frank-lenormand opened 6 months ago

frank-lenormand commented 6 months ago

Hi,

I believe it’s not possible to override the Git commands run by Gitu (or defined new Gitu commands) from the configuration file:

https://github.com/altsem/gitu/blob/a0c2970/src/default_config.toml

This might be out of scope for the project, but I’d appreciate being able to define my own shortcuts, similarly to how I do it with tig.

Thanks!

evanrichter commented 5 months ago

I'd love to configure these commands as well. A concrete example is my alias for git commit in my shell: alias gg='git commit --verbose' so that I can see the diff of what I'm about to commit, right in my editor.

I'd love to hit cc in gitu, have --verbose appended, and also see the diff in my commit message editor :)

altsem commented 5 months ago

@evanrichter Didn't know about this, will start using this myself :+1:. For this particular case, there's a configuration option in git that'll make it work in gitu as well: git config --global commit.verbose true