From 41e9335ea8f6846b4452fb2aa2e747377e037209 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 9 Mar 2025 18:09:24 +0100 Subject: [PATCH] Reorder configs in OSConfig There is a section at the end with deprecated settings, and a comment saying "The following configs are all deprecated". The clipboard-related settings were accidentally added to that section; they are not deprecated, so move them up to before that section. --- pkg/config/user_config.go | 16 ++++++++-------- schema/config.json | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 3cb945a8d..2ef595a86 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -581,6 +581,14 @@ type OSConfig struct { // Command for opening a link. Should contain "{{link}}". OpenLink string `yaml:"openLink,omitempty"` + // CopyToClipboardCmd is the command for copying to clipboard. + // See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard + CopyToClipboardCmd string `yaml:"copyToClipboardCmd,omitempty"` + + // ReadFromClipboardCmd is the command for reading the clipboard. + // See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard + ReadFromClipboardCmd string `yaml:"readFromClipboardCmd,omitempty"` + // -------- // The following configs are all deprecated and kept for backward @@ -603,14 +611,6 @@ type OSConfig struct { // OpenLinkCommand is the command for opening a link // Deprecated: use OpenLink instead. OpenLinkCommand string `yaml:"openLinkCommand,omitempty" jsonschema:"deprecated"` - - // CopyToClipboardCmd is the command for copying to clipboard. - // See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - CopyToClipboardCmd string `yaml:"copyToClipboardCmd,omitempty"` - - // ReadFromClipboardCmd is the command for reading the clipboard. - // See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - ReadFromClipboardCmd string `yaml:"readFromClipboardCmd,omitempty"` } type CustomCommandAfterHook struct { diff --git a/schema/config.json b/schema/config.json index a4b4d0f43..4ce777b11 100644 --- a/schema/config.json +++ b/schema/config.json @@ -1551,6 +1551,14 @@ "type": "string", "description": "Command for opening a link. Should contain \"{{link}}\"." }, + "copyToClipboardCmd": { + "type": "string", + "description": "CopyToClipboardCmd is the command for copying to clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" + }, + "readFromClipboardCmd": { + "type": "string", + "description": "ReadFromClipboardCmd is the command for reading the clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" + }, "editCommand": { "type": "string", "description": "EditCommand is the command for editing a file.\nDeprecated: use Edit instead. Note that semantics are different:\nEditCommand is just the command itself, whereas Edit contains a\n\"{{filename}}\" variable." @@ -1566,14 +1574,6 @@ "openLinkCommand": { "type": "string", "description": "OpenLinkCommand is the command for opening a link\nDeprecated: use OpenLink instead." - }, - "copyToClipboardCmd": { - "type": "string", - "description": "CopyToClipboardCmd is the command for copying to clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" - }, - "readFromClipboardCmd": { - "type": "string", - "description": "ReadFromClipboardCmd is the command for reading the clipboard.\nSee https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard" } }, "additionalProperties": false,