1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Jesse Duffield
b61ca21a84 Allow checking for merge conflicts after running a custom command
We have a use-case to rebind 'm' to the merge action in the branches panel. There's three ways to handle this:
1) For all global keybindings, define a per-panel key that invokes it
2) Give a name to all controller actions and allow them to be invoked in custom commands
3) Allow checking for merge conflicts after running a custom command so that users can add their own 'git merge' custom command
that matches the in-built action

Option 1 is hairy, Option 2 though good for users introduces new backwards compatibility issues that I don't want to do
right now, and option 3 is trivially easy to implement so that's what I'm doing.

I've put this under an 'after' key so that we can add more things later. I'm imagining other things like being able to
move the cursor to a newly added item etc.

I considered always running this hook by default but I'd rather not: it's matching on the output text and I'd rather something
like that be explicitly opted-into to avoid cases where we erroneously believe that there are conflicts.
2023-07-13 18:40:34 +10:00
Jesse Duffield
16fa22a36e Add suggestionsPreset to custom commands system 2023-05-29 14:24:49 +10:00
Jesse Duffield
db12853bbe lots of changes 2023-04-30 13:19:53 +10:00
Jesse Duffield
43251e7275 split context common from helper common 2023-04-30 13:19:53 +10:00
Jesse Duffield
7410acd1aa move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
casswedson
b7928042f0 chore: typo hunting ft. codespell 2022-04-06 08:52:41 +10:00
Jesse Duffield
98e7ec0905 add type alias for Key 2022-03-27 18:16:16 +11:00
Jesse Duffield
ef7c4c9ca9 refactor custom commands
more custom command refactoring
2022-03-17 19:13:40 +11:00