2024-01-09 15:34:53 -06:00
|
|
|
package repostatus
|
|
|
|
|
2025-01-07 18:45:34 -06:00
|
|
|
/*
|
2024-02-15 22:50:50 -06:00
|
|
|
func (rs *RepoStatus) XtermNohup(cmdline string) {
|
|
|
|
shell.XtermCmd(rs.Path(), []string{cmdline})
|
|
|
|
}
|
|
|
|
func (rs *RepoStatus) Xterm(cmdline string) {
|
|
|
|
shell.XtermCmd(rs.Path(), []string{cmdline})
|
|
|
|
}
|
|
|
|
func (rs *RepoStatus) XtermWait(cmdline string) {
|
|
|
|
shell.XtermCmdWait(rs.Path(), []string{cmdline})
|
|
|
|
}
|
2024-02-16 11:41:29 -06:00
|
|
|
|
2024-02-15 22:50:50 -06:00
|
|
|
func (rs *RepoStatus) XtermBash(args []string) {
|
|
|
|
var argsX = []string{"-geometry", "120x40"}
|
|
|
|
tmp := strings.Join(args, " ") + ";bash"
|
|
|
|
argsX = append(argsX, "-e", "bash", "-c", tmp)
|
2024-02-12 21:50:54 -06:00
|
|
|
argsX = append(argsX, args...)
|
|
|
|
log.Info("xterm cmd=", argsX)
|
|
|
|
// set less to not exit on small diff's
|
|
|
|
os.Setenv("LESS", "-+F -+X -R")
|
|
|
|
cmd := exec.Command("xterm", argsX...)
|
|
|
|
path := rs.realPath.String()
|
|
|
|
cmd.Dir = path
|
|
|
|
if err := cmd.Run(); err != nil {
|
2024-02-16 21:20:52 -06:00
|
|
|
log.Log(WARN, "xterm.Run() failed")
|
|
|
|
log.Log(WARN, "path =", path)
|
|
|
|
log.Log(WARN, "cmd = xterm", argsX)
|
2024-02-12 21:50:54 -06:00
|
|
|
} else {
|
2024-02-16 21:20:52 -06:00
|
|
|
log.Log(WARN, "xterm.Run() worked")
|
|
|
|
log.Log(WARN, "path =", path)
|
|
|
|
log.Log(WARN, "cmd = xterm", argsX)
|
2024-02-12 21:50:54 -06:00
|
|
|
}
|
|
|
|
}
|
2025-01-07 18:45:34 -06:00
|
|
|
*/
|