mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
remove redundant title-setting shell command args
This commit is contained in:
parent
62a7d9bbcc
commit
a78cbf4882
1 changed files with 3 additions and 5 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
|
@ -270,14 +269,13 @@ func GetLazygitPath() string {
|
|||
}
|
||||
|
||||
func (c *OSCommand) UpdateWindowTitle() error {
|
||||
if runtime.GOOS != "windows" {
|
||||
if c.Platform.OS != "windows" {
|
||||
return nil
|
||||
}
|
||||
path, getWdErr := os.Getwd()
|
||||
if getWdErr != nil {
|
||||
return getWdErr
|
||||
}
|
||||
title := fmt.Sprint(filepath.Base(path), " - Lazygit")
|
||||
args := append([]string{"cmd", "/C", "title"}, strings.Split(title, " ")...)
|
||||
return c.Cmd.NewShell(strings.Join(args, " ")).Run()
|
||||
argString := fmt.Sprint("title ", filepath.Base(path), " - Lazygit")
|
||||
return c.Cmd.NewShell(argString).Run()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue