summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/config_default_platform.go7
-rw-r--r--pkg/config/config_linux.go7
-rw-r--r--pkg/config/config_windows.go7
-rw-r--r--pkg/config/user_config.go3
4 files changed, 15 insertions, 9 deletions
diff --git a/pkg/config/config_default_platform.go b/pkg/config/config_default_platform.go
index fabdf8a88..0f56297d3 100644
--- a/pkg/config/config_default_platform.go
+++ b/pkg/config/config_default_platform.go
@@ -5,8 +5,9 @@ package config
// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {
return OSConfig{
- EditCommand: ``,
- 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 8399e0e47..fe75b7322 100644
--- a/pkg/config/config_linux.go
+++ b/pkg/config/config_linux.go
@@ -3,8 +3,9 @@ package config
// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {
return OSConfig{
- EditCommand: ``,
- 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 f6780eb6b..71124808b 100644
--- a/pkg/config/config_windows.go
+++ b/pkg/config/config_windows.go
@@ -3,8 +3,9 @@ package config
// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {
return OSConfig{
- EditCommand: ``,
- 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 2f435f066..d2d98ac52 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -255,6 +255,9 @@ type OSConfig struct {
// 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"`