diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 3df5c5a9b..9d5fb3742 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -611,8 +611,8 @@ type CustomCommandAfterHook struct { type CustomCommand struct { // 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 Key string `yaml:"key"` - // The context in which to listen for the key - Context string `yaml:"context" jsonschema:"enum=status,enum=files,enum=worktrees,enum=localBranches,enum=remotes,enum=remoteBranches,enum=tags,enum=commits,enum=reflogCommits,enum=subCommits,enum=commitFiles,enum=stash,enum=global"` + // 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". + Context string `yaml:"context" jsonschema:"example=status,example=files,example=worktrees,example=localBranches,example=remotes,example=remoteBranches,example=tags,example=commits,example=reflogCommits,example=subCommits,example=commitFiles,example=stash,example=global"` // The command to run (using Go template syntax for placeholder values) Command string `yaml:"command" jsonschema:"example=git fetch {{.Form.Remote}} {{.Form.Branch}} && git checkout FETCH_HEAD"` // If true, run the command in a subprocess (e.g. if the command requires user input) diff --git a/schema/config.json b/schema/config.json index 8ce2c5738..fff823018 100644 --- a/schema/config.json +++ b/schema/config.json @@ -875,7 +875,8 @@ }, "context": { "type": "string", - "enum": [ + "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\".", + "examples": [ "status", "files", "worktrees", @@ -889,8 +890,7 @@ "commitFiles", "stash", "global" - ], - "description": "The context in which to listen for the key" + ] }, "command": { "type": "string",