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

30 Commits

Author SHA1 Message Date
Jesse Duffield
a313b16704 Add more worktree tests 2023-07-30 18:35:23 +10:00
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
a694c458dd Support authors and tags in custom command suggestions preset 2023-06-07 10:18:01 +10:00
Jesse Duffield
1de876ed4d Support using command output directly in menuFromCommand custom command prompt
The menuFromCommand option is a little complicated, so I'm adding an easy way to just use the command output directly,
where each line becomes a suggestion, as-is.

Now that we support suggestions in the input prompt, there's less of a need for menuFromCommand, but it probably still
serves some purpose.

In future I want to support this filter/valueFormat/labelFormat thing for suggestions too. I would like to think a little more
about the interface though: is using a regex like we currently do really the simplest approach?
2023-05-29 22:52:16 +10:00
Jesse Duffield
036a1ea519 Support suggestions generated from command in custom commands
This changes the interface a bit but it was only added earlier today so I doubt anybody is dependent on it yet.

I'm also updating the docs.
2023-05-29 22:47:35 +10:00
Jesse Duffield
16fa22a36e Add suggestionsPreset to custom commands system 2023-05-29 14:24:49 +10:00
Jesse Duffield
c953871ec7 use lowercase 'quote' for consistency with existing custom command template functions 2022-10-02 18:43:25 -07:00
Ryooooooga
19df238b77
feat: allow OSCommand.Quote to be invoked within a custom command 2022-09-30 21:16:45 +09:00
eetann
77622e5638 fix: document link 2022-08-10 13:17:07 +09:00
Jesse Duffield
c81c046615
Merge pull request #2059 from sportshead/master 2022-07-31 16:19:59 +10:00
Luka Markušić
61e14c46b2 Add SelectedPath to the list of placeholder values 2022-07-30 08:25:40 +02:00
sportshead
168fbe0a6c Add showOutput option to docs 2022-07-28 18:57:16 +08:00
Michael Mead
9d304098bb feat: add confirm prompt for custom keybindings
- Supports configuring a custom confirmation prompt via `config.yml` for
  custom keybindings. A new `CustomCommandPrompt.Body` field is
  used to store the immutable body text of the confirmation popup.
- Adds a sample 'confirm' prompt to the example `config.yml`.
- Updates the `Prompts` section of the documentation to include
  'confirm' prompt type and also describe which fields pertain to it
  (i.e. `initialValue`).

Closes: https://github.com/jesseduffield/lazygit/issues/1858

Signed-off-by: Michael Mead <mmead.developer@gmail.com>
2022-07-04 11:36:13 -07:00
Jesse Duffield
f6ce220807
Update Custom_Command_Keybindings.md 2022-06-01 19:14:08 +10:00
Brian Di Palma
a5d4eccfa6
Update Custom_Command_Keybindings.md 2022-04-19 12:17:06 +01:00
Jesse Duffield
4ab5e54139 add support for git bisect 2022-01-22 10:48:51 +11:00
Elwardi
b5d8849c06 Support match colors in labelFormat entry in menuFromCommand prompts 2021-08-07 16:06:36 +01:00
Elwardi
dcd3b7c058 Show only labels in menuFromCommand prompts 2021-08-06 18:38:26 +01:00
Elwardi
906ec30cac Minor changes to menuFromCommand prompts 2021-08-06 10:53:32 +01:00
Elwardi
a8ec044f0e Make menuFromCommand format menu items and their description 2021-08-05 15:45:18 +01:00
Elwardi
b92ff3ee3f Consider first match only in menuFromCommand prompt 2021-07-19 13:06:00 +01:00
Elwardi
f1ced5539a Add option to format filter matches to menuFromCommand prompts 2021-07-19 11:46:29 +01:00
Elwardi
9daa47fb2d Add docs for menuFromCommand prompts 2021-07-18 10:36:01 +01:00
Jeff Hertzler
106fce26b5 Update Custom_Command_Keybindings.md 2020-12-23 18:54:26 -08:00
Jesse Duffield
d02e992265
Update Custom_Command_Keybindings.md 2020-11-21 17:35:51 +11:00
Jesse Duffield
de482262e1 support setting description in custom command 2020-09-27 11:32:54 +10:00
Jesse Duffield
1b39c829ac
Update Custom_Command_Keybindings.md 2020-09-27 11:15:08 +10:00
Jesse Duffield
4dad7064cc
Update Custom_Command_Keybindings.md 2020-09-27 11:11:44 +10:00
Jesse Duffield
8dcc148a22
Update Custom_Command_Keybindings.md 2020-09-27 10:28:39 +10:00
Jesse Duffield
e0ea2b75a1 add custom command keybindings doc 2020-09-27 09:56:33 +10:00