summaryrefslogtreecommitdiffstats
path: root/pkg/config
diff options
context:
space:
mode:
authorcaojoshua <cao.joshua@yahoo.com>2021-05-19 23:44:58 -0700
committerJesse Duffield <jessedduffield@gmail.com>2021-06-05 10:58:09 +1000
commit60468d2e174656675b8058df519b6547bc7ca62e (patch)
tree397ed7424f8f0ba4061206b4989804fa509e56c8 /pkg/config
parentcb78cf7de4798bf628cf726689d62b18da34a347 (diff)
Edit command as user OS config option
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/config_default_platform.go1
-rw-r--r--pkg/config/config_linux.go1
-rw-r--r--pkg/config/config_windows.go1
-rw-r--r--pkg/config/user_config.go3
4 files changed, 6 insertions, 0 deletions
diff --git a/pkg/config/config_default_platform.go b/pkg/config/config_default_platform.go
index e9e2f63ba..fabdf8a88 100644
--- a/pkg/config/config_default_platform.go
+++ b/pkg/config/config_default_platform.go
@@ -5,6 +5,7 @@ package config
// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {
return OSConfig{
+ EditCommand: ``,
OpenCommand: "open {{filename}}",
OpenLinkCommand: "open {{link}}",
}
diff --git a/pkg/config/config_linux.go b/pkg/config/config_linux.go
index b3d7f42b8..8399e0e47 100644
--- a/pkg/config/config_linux.go
+++ b/pkg/config/config_linux.go
@@ -3,6 +3,7 @@ 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"`,
}
diff --git a/pkg/config/config_windows.go b/pkg/config/config_windows.go
index cea722424..f6780eb6b 100644
--- a/pkg/config/config_windows.go
+++ b/pkg/config/config_windows.go
@@ -3,6 +3,7 @@ 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}}"`,
}
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index cf193011b..b36c68bb5 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -248,6 +248,9 @@ type KeybindingSubmodulesConfig struct {
// OSConfig contains config on the level of the os
type OSConfig struct {
+ // EditCommand is the command for editing a file
+ EditCommand string `yaml:"editCommand,omitempty"`
+
// OpenCommand is the command for opening a file
OpenCommand string `yaml:"openCommand,omitempty"`