1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Change OpenCommand to Open and OpenLinkCommand to OpenLink

We do this for consistency with the edit settings. The old names are kept as a
fallback for now.
This commit is contained in:
Stefan Haller
2023-03-28 18:00:40 +02:00
parent b7e029adc7
commit e4e16fa38e
6 changed files with 31 additions and 14 deletions

View File

@ -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 == "" {
commandTemplate = config.GetPlatformDefaultConfig().OpenLinkCommand
// Legacy support
commandTemplate = c.UserConfig.OS.OpenLinkCommand
}
if commandTemplate == "" {
commandTemplate = config.GetPlatformDefaultConfig().OpenLink
}
templateValues := map[string]string{
"link": c.Quote(link),