summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg/commands/oscommands/os.go6
-rw-r--r--pkg/config/user_config.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index 11c964ca4..f66f25b72 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -79,6 +79,9 @@ func FileType(path string) string {
func (c *OSCommand) OpenFile(filename string) error {
commandTemplate := c.UserConfig.OS.OpenCommand
+ if commandTemplate == "" {
+ commandTemplate = config.GetPlatformDefaultConfig().OpenCommand
+ }
templateValues := map[string]string{
"filename": c.Quote(filename),
}
@@ -88,6 +91,9 @@ func (c *OSCommand) OpenFile(filename string) error {
func (c *OSCommand) OpenLink(link string) error {
commandTemplate := c.UserConfig.OS.OpenLinkCommand
+ if commandTemplate == "" {
+ commandTemplate = config.GetPlatformDefaultConfig().OpenLinkCommand
+ }
templateValues := map[string]string{
"link": c.Quote(link),
}
diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go
index a7be98c9c..0c227899e 100644
--- a/pkg/config/user_config.go
+++ b/pkg/config/user_config.go
@@ -599,7 +599,7 @@ func GetDefaultConfig() *UserConfig {
BulkMenu: "b",
},
},
- OS: GetPlatformDefaultConfig(),
+ OS: OSConfig{},
DisableStartupPopups: false,
CustomCommands: []CustomCommand(nil),
Services: map[string]string(nil),