forked from x/icebergs
opt some
This commit is contained in:
parent
ee6113de53
commit
67e5d07a13
@ -111,7 +111,7 @@ func (f *Frame) prompt(m *ice.Message, list ...string) *Frame {
|
||||
list = append(list, f.ps1...)
|
||||
}
|
||||
|
||||
m.Sleep("10ms")
|
||||
m.Sleep("30ms")
|
||||
fmt.Fprintf(f.stdout, "\r")
|
||||
for _, v := range list {
|
||||
switch v {
|
||||
@ -241,6 +241,7 @@ func (f *Frame) scan(m *ice.Message, h, line string, r io.Reader) *Frame {
|
||||
|
||||
m.I, m.O = r, f.stdout
|
||||
bio := bufio.NewScanner(r)
|
||||
m.Sleep("3s")
|
||||
for f.prompt(m, ps...); bio.Scan() && !f.exit; f.prompt(m, ps...) {
|
||||
if h == STDIO && len(bio.Text()) == 0 {
|
||||
continue // 空行
|
||||
|
@ -174,7 +174,7 @@ func _space_handle(m *ice.Message, safe bool, send map[string]*ice.Message, c *w
|
||||
}
|
||||
|
||||
} else { // 接收响应
|
||||
m.Debug("what %v", 123)
|
||||
m.Sleep("30ms")
|
||||
res.Back(msg)
|
||||
}
|
||||
}
|
||||
|
@ -119,16 +119,16 @@ func init() {
|
||||
|
||||
var _contexts = kit.Dict(
|
||||
"tmux", `# 终端环境
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp
|
||||
`,
|
||||
"base", `# 生产环境
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp ice
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp ice
|
||||
`,
|
||||
"miss", `# 开发环境
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp dev
|
||||
export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp dev
|
||||
`,
|
||||
"tool", `# 群组环境
|
||||
mkdir contexts; cd contexts
|
||||
export ctx_log=/dev/stdout ctx_dev={{.Option "httphost"}} ctx_river={{.Option "sess.river"}} ctx_share={{.Option "share"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp ice
|
||||
export ctx_log=/dev/stdout ctx_dev={{.Option "httphost"}} ctx_river={{.Option "sess.river"}} ctx_share={{.Option "share"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp ice
|
||||
`,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user