Skip to content

Commit 41e9335

Browse files
committed
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.
1 parent 4e5e21f commit 41e9335

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

pkg/config/user_config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,14 @@ type OSConfig struct {
581581
// Command for opening a link. Should contain "{{link}}".
582582
OpenLink string `yaml:"openLink,omitempty"`
583583

584+
// CopyToClipboardCmd is the command for copying to clipboard.
585+
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
586+
CopyToClipboardCmd string `yaml:"copyToClipboardCmd,omitempty"`
587+
588+
// ReadFromClipboardCmd is the command for reading the clipboard.
589+
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
590+
ReadFromClipboardCmd string `yaml:"readFromClipboardCmd,omitempty"`
591+
584592
// --------
585593

586594
// The following configs are all deprecated and kept for backward
@@ -603,14 +611,6 @@ type OSConfig struct {
603611
// OpenLinkCommand is the command for opening a link
604612
// Deprecated: use OpenLink instead.
605613
OpenLinkCommand string `yaml:"openLinkCommand,omitempty" jsonschema:"deprecated"`
606-
607-
// CopyToClipboardCmd is the command for copying to clipboard.
608-
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
609-
CopyToClipboardCmd string `yaml:"copyToClipboardCmd,omitempty"`
610-
611-
// ReadFromClipboardCmd is the command for reading the clipboard.
612-
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
613-
ReadFromClipboardCmd string `yaml:"readFromClipboardCmd,omitempty"`
614614
}
615615

616616
type CustomCommandAfterHook struct {

schema/config.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,14 @@
15511551
"type": "string",
15521552
"description": "Command for opening a link. Should contain \"{{link}}\"."
15531553
},
1554+
"copyToClipboardCmd": {
1555+
"type": "string",
1556+
"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"
1557+
},
1558+
"readFromClipboardCmd": {
1559+
"type": "string",
1560+
"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"
1561+
},
15541562
"editCommand": {
15551563
"type": "string",
15561564
"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 @@
15661574
"openLinkCommand": {
15671575
"type": "string",
15681576
"description": "OpenLinkCommand is the command for opening a link\nDeprecated: use OpenLink instead."
1569-
},
1570-
"copyToClipboardCmd": {
1571-
"type": "string",
1572-
"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"
1573-
},
1574-
"readFromClipboardCmd": {
1575-
"type": "string",
1576-
"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"
15771577
}
15781578
},
15791579
"additionalProperties": false,

0 commit comments

Comments
 (0)