Skip to content

Commit 17f45ac

Browse files
authored
Merge pull request #12 from mshedsilegx/windows-shell-support
Windows shell support
2 parents 937f208 + 79c1698 commit 17f45ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

menus.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,17 @@ func ExecShell() MenuFn {
384384
// 4. Execute the shell path with eval
385385
shell := []string{"/bin/sh", "-c", "printf '\\e[0m\\e[?25h' && clear && eval `grep ^$(id -un): /etc/passwd | cut -d : -f 7-`"}
386386
if runtime.GOOS == "windows" {
387-
shell = []string{"cmd.exe"}
387+
shell = []string{"cmd.exe", "/c", "cls && cmd.exe"}
388388
}
389389
if err := c.Exec(shell); err != nil {
390390
log.StatusErr(err)
391391
}
392392

393+
if runtime.GOOS == "windows" {
394+
if err := RefreshDisplay(); err != nil {
395+
log.StatusErr(err)
396+
}
397+
}
393398
return nil
394399
}
395400

0 commit comments

Comments
 (0)