From ae91a34c5aae723888d0b0bd768b53933ba8145b Mon Sep 17 00:00:00 2001 From: harveyshao Date: Mon, 2 Jan 2023 20:28:59 +0800 Subject: [PATCH] opt some --- base/ssh/script.go | 6 +++--- misc/git/repos.go | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/base/ssh/script.go b/base/ssh/script.go index b888f130..c143490a 100644 --- a/base/ssh/script.go +++ b/base/ssh/script.go @@ -112,8 +112,8 @@ func (f *Frame) parse(m *ice.Message, h, line string) string { func (f *Frame) scan(m *ice.Message, h, line string) *Frame { f.ps1 = kit.Simple(m.Confv(PROMPT, kit.Keym(PS1))) f.ps2 = kit.Simple(m.Confv(PROMPT, kit.Keym(PS2))) + m.Options(MESSAGE, m, ice.LOG_DISABLE, ice.TRUE) m.I, m.O = f.stdin, f.stdout - m.Optionv(MESSAGE, m) ps, bio := f.ps1, bufio.NewScanner(f.stdin) for f.prompt(m, ps...); f.stdin != nil && bio.Scan(); f.prompt(m, ps...) { if len(bio.Text()) == 0 && h == STDIO { @@ -231,8 +231,8 @@ func init() { } }}, PROMPT: {Name: "prompt arg run", Help: "命令提示", Actions: ctx.ConfAction( - PS1, []ice.Any{"\033[33;44m", mdb.COUNT, "[", mdb.TIME, "]", "\033[5m", TARGET, "\033[0m", "\033[44m", ">", "\033[0m ", "\033[?25h", "\033[32m"}, - PS2, []ice.Any{mdb.COUNT, " ", TARGET, "> "}, + PS1, ice.List{"\033[33;44m", mdb.COUNT, "[", mdb.TIME, "]", "\033[5m", TARGET, "\033[0m", "\033[44m", ">", "\033[0m ", "\033[?25h", "\033[32m"}, + PS2, ice.List{mdb.COUNT, " ", TARGET, "> "}, ), Hand: func(m *ice.Message, arg ...string) { if f, ok := m.Target().Server().(*Frame); ok { f.prompt(m, arg...) diff --git a/misc/git/repos.go b/misc/git/repos.go index c141e3f2..2392eb28 100644 --- a/misc/git/repos.go +++ b/misc/git/repos.go @@ -80,10 +80,7 @@ func _repos_commit(m *ice.Message, dir, branch string, cb func(*gogit.Commit, *g } if p := ci.ParentCommit(0); p != nil { oid = p.Oid - m.Debug("what %v %v", ci.Oid.Short(), oid.Short()) continue - } else { - m.Debug("what %v %v", ci.Oid.Short()) } } break