lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Introduce more alternate keybinding slots for quit.

Open LiamKearn opened this issue 2 years ago • 1 comments

I'd like to be able to quit with all of:

  • C-c
  • C-d
  • q

Apologies, This implementation is ugly because I haven't had a chance to learn go. Maybe a good samaritan could DRY up the alternate keybindings pattern in the future so that it may scale infinitely based on user config.

I tried to chuck a for loop at the end of the bindings slice and append to it but it appears I'd need to reflect (in a compiled language? I guess go has a runtime more extensive than it's famous GC?) in order to dynamically access opts.GetKey(opts.Config.Universal.QuitAlt(N)), by name. Too much go'iness and reflection ugliness for me 😅 I'm sure there is a better data layout than that.

But hey if it's not DRY at least it's declarative and maintainable 😉

LiamKearn avatar Mar 31 '23 06:03 LiamKearn

Uffizzi Ephemeral Environment deployment-20874

:cloud: https://app.uffizzi.com/github.com/jesseduffield/lazygit/pull/2529

:page_facing_up: View Application Logs etc.

What is Uffizzi? Learn more!

github-actions[bot] avatar Mar 31 '23 06:03 github-actions[bot]