From ac609bd37c0b879ce08f0fcff7b1c7ef09d37333 Mon Sep 17 00:00:00 2001 From: Ryooooooga Date: Wed, 4 Aug 2021 18:43:34 +0900 Subject: fix backward compatibility --- pkg/config/config_default_platform.go | 8 ++++---- pkg/config/config_linux.go | 8 ++++---- pkg/config/config_windows.go | 8 ++++---- pkg/config/user_config.go | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'pkg/config') diff --git a/pkg/config/config_default_platform.go b/pkg/config/config_default_platform.go index cb6e338df..0f56297d3 100644 --- a/pkg/config/config_default_platform.go +++ b/pkg/config/config_default_platform.go @@ -5,9 +5,9 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - Editor: ``, - EditCommand: `{{editor}} {{filename}}`, - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", + EditCommand: ``, + EditCommandTemplate: `{{editor}} {{filename}}`, + OpenCommand: "open {{filename}}", + OpenLinkCommand: "open {{link}}", } } diff --git a/pkg/config/config_linux.go b/pkg/config/config_linux.go index 1eed335f0..fe75b7322 100644 --- a/pkg/config/config_linux.go +++ b/pkg/config/config_linux.go @@ -3,9 +3,9 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - Editor: ``, - EditCommand: `{{editor}} {{filename}}`, - OpenCommand: `sh -c "xdg-open {{filename}} >/dev/null"`, - OpenLinkCommand: `sh -c "xdg-open {{link}} >/dev/null"`, + EditCommand: ``, + EditCommandTemplate: `{{editor}} {{filename}}`, + OpenCommand: `sh -c "xdg-open {{filename}} >/dev/null"`, + OpenLinkCommand: `sh -c "xdg-open {{link}} >/dev/null"`, } } diff --git a/pkg/config/config_windows.go b/pkg/config/config_windows.go index 1bc919848..71124808b 100644 --- a/pkg/config/config_windows.go +++ b/pkg/config/config_windows.go @@ -3,9 +3,9 @@ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ - Editor: ``, - EditCommand: `{{editor}} {{filename}}`, - OpenCommand: `cmd /c "start "" {{filename}}"`, - OpenLinkCommand: `cmd /c "start "" {{link}}"`, + EditCommand: ``, + EditCommandTemplate: `{{editor}} {{filename}}`, + OpenCommand: `cmd /c "start "" {{filename}}"`, + OpenLinkCommand: `cmd /c "start "" {{link}}"`, } } diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index ea079948e..e7f952890 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -252,12 +252,12 @@ type KeybindingSubmodulesConfig struct { // OSConfig contains config on the level of the os type OSConfig struct { - // Editor is the command for editing a file - Editor string `yaml:"editor,omitempty"` - - // EditCommand is the command template for editing a file + // EditCommand is the command for editing a file EditCommand string `yaml:"editCommand,omitempty"` + // EditCommandTemplate is the command template for editing a file + EditCommandTemplate string `yaml:"editCommandTemplate,omitempty"` + // OpenCommand is the command for opening a file OpenCommand string `yaml:"openCommand,omitempty"` -- cgit v1.2.3