1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-17 20:31:19 +03:00
Files
lazygit/pkg/commands/oscommands/os_windows.go
Stefan Haller e5acbed848 Cleanup: move UpdateWindowTitle to platform-specific source files
No need to do a runtime check if we already have the platform-specific files.
2025-08-11 18:07:21 +02:00

25 lines
449 B
Go

package oscommands
import (
"fmt"
"os"
"path/filepath"
)
func GetPlatform() *Platform {
return &Platform{
OS: "windows",
Shell: "cmd",
ShellArg: "/c",
}
}
func (c *OSCommand) UpdateWindowTitle() error {
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()
}