summaryrefslogtreecommitdiffstats
path: root/pkg/commands/oscommands/os.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/oscommands/os.go')
-rw-r--r--pkg/commands/oscommands/os.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index f66f25b72..c8f38843b 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -78,9 +78,13 @@ func FileType(path string) string {
}
func (c *OSCommand) OpenFile(filename string) error {
- commandTemplate := c.UserConfig.OS.OpenCommand
+ commandTemplate := c.UserConfig.OS.Open
if commandTemplate == "" {
- commandTemplate = config.GetPlatformDefaultConfig().OpenCommand
+ // Legacy support
+ commandTemplate = c.UserConfig.OS.OpenCommand
+ }
+ if commandTemplate == "" {
+ commandTemplate = config.GetPlatformDefaultConfig().Open
}
templateValues := map[string]string{
"filename": c.Quote(filename),
@@ -90,9 +94,13 @@ func (c *OSCommand) OpenFile(filename string) error {
}
func (c *OSCommand) OpenLink(link string) error {
- commandTemplate := c.UserConfig.OS.OpenLinkCommand
+ commandTemplate := c.UserConfig.OS.OpenLink
+ if commandTemplate == "" {
+ // Legacy support
+ commandTemplate = c.UserConfig.OS.OpenLinkCommand
+ }
if commandTemplate == "" {
- commandTemplate = config.GetPlatformDefaultConfig().OpenLinkCommand
+ commandTemplate = config.GetPlatformDefaultConfig().OpenLink
}
templateValues := map[string]string{
"link": c.Quote(link),