1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Cleanup: move UpdateWindowTitle to platform-specific source files

No need to do a runtime check if we already have the platform-specific files.
This commit is contained in:
Stefan Haller
2025-08-08 20:12:05 +02:00
parent 77a9207f9e
commit e5acbed848
3 changed files with 19 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
package oscommands
import (
"fmt"
"io"
"os"
"os/exec"
@@ -329,15 +328,3 @@ func GetLazygitPath() string {
}
return `"` + filepath.ToSlash(ex) + `"`
}
func (c *OSCommand) UpdateWindowTitle() error {
if c.Platform.OS != "windows" {
return nil
}
path, getWdErr := os.Getwd()
if getWdErr != nil {
return getWdErr
}
argString := fmt.Sprint("title ", filepath.Base(path), " - Lazygit")
return c.Cmd.NewShell(argString, c.UserConfig().OS.ShellFunctionsFile).Run()
}