repostatus/unix.go

36 lines
995 B
Go

package repostatus
/*
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})
}
func (rs *RepoStatus) XtermBash(args []string) {
var argsX = []string{"-geometry", "120x40"}
tmp := strings.Join(args, " ") + ";bash"
argsX = append(argsX, "-e", "bash", "-c", tmp)
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 {
log.Log(WARN, "xterm.Run() failed")
log.Log(WARN, "path =", path)
log.Log(WARN, "cmd = xterm", argsX)
} else {
log.Log(WARN, "xterm.Run() worked")
log.Log(WARN, "path =", path)
log.Log(WARN, "cmd = xterm", argsX)
}
}
*/