Add commandMenu property to custom commands

This commit is contained in:
Stefan Haller 2025-02-20 10:25:14 +01:00
parent e799976b8a
commit 22512d55a8
7 changed files with 191 additions and 8 deletions

View file

@ -63,6 +63,13 @@
"type": "string",
"description": "The key to trigger the command. Use a single letter or one of the values from https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md"
},
"commandMenu": {
"items": {
"$ref": "#/$defs/CustomCommand"
},
"type": "array",
"description": "Instead of defining a single custom command, create a menu of custom commands. Useful for grouping related commands together under a single keybinding, and for keeping them out of the global keybindings menu.\nWhen using this, all other fields except Key and Description are ignored and must be empty."
},
"context": {
"type": "string",
"description": "The context in which to listen for the key. Valid values are: status, files, worktrees, localBranches, remotes, remoteBranches, tags, commits, reflogCommits, subCommits, commitFiles, stash, and global. Multiple contexts separated by comma are allowed; most useful for \"commits, subCommits\" or \"files, commitFiles\".",