File tree Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1
1
package oscommands
2
2
3
3
import (
4
- "fmt"
5
4
"io"
6
5
"os"
7
6
"os/exec"
@@ -329,15 +328,3 @@ func GetLazygitPath() string {
329
328
}
330
329
return `"` + filepath .ToSlash (ex ) + `"`
331
330
}
332
-
333
- func (c * OSCommand ) UpdateWindowTitle () error {
334
- if c .Platform .OS != "windows" {
335
- return nil
336
- }
337
- path , getWdErr := os .Getwd ()
338
- if getWdErr != nil {
339
- return getWdErr
340
- }
341
- argString := fmt .Sprint ("title " , filepath .Base (path ), " - Lazygit" )
342
- return c .Cmd .NewShell (argString , c .UserConfig ().OS .ShellFunctionsFile ).Run ()
343
- }
Original file line number Diff line number Diff line change @@ -34,3 +34,7 @@ func getUserShell() string {
34
34
35
35
return "bash"
36
36
}
37
+
38
+ func (c * OSCommand ) UpdateWindowTitle () error {
39
+ return nil
40
+ }
Original file line number Diff line number Diff line change 1
1
package oscommands
2
2
3
+ import (
4
+ "fmt"
5
+ "os"
6
+ "path/filepath"
7
+ )
8
+
3
9
func GetPlatform () * Platform {
4
10
return & Platform {
5
11
OS : "windows" ,
6
12
Shell : "cmd" ,
7
13
ShellArg : "/c" ,
8
14
}
9
15
}
16
+
17
+ func (c * OSCommand ) UpdateWindowTitle () error {
18
+ path , getWdErr := os .Getwd ()
19
+ if getWdErr != nil {
20
+ return getWdErr
21
+ }
22
+ argString := fmt .Sprint ("title " , filepath .Base (path ), " - Lazygit" )
23
+ return c .Cmd .NewShell (argString , c .UserConfig ().OS .ShellFunctionsFile ).Run ()
24
+ }
You can’t perform that action at this time.
0 commit comments