diff --git a/base/ssh/scripts.go b/base/ssh/scripts.go index 57703396..fc5c9432 100644 --- a/base/ssh/scripts.go +++ b/base/ssh/scripts.go @@ -82,7 +82,6 @@ func (f *Frame) prompt(m *ice.Message, list ...string) *Frame { list = append(list, f.ps1...) } - m.Sleep("30ms") fmt.Fprintf(f.stdout, "\r") for _, v := range list { switch v { diff --git a/core/code/autogen.go b/core/code/autogen.go index 05c9e3c1..409f20d4 100644 --- a/core/code/autogen.go +++ b/core/code/autogen.go @@ -40,14 +40,14 @@ import ( type {{.Option "name"}} struct { ice.{{.Option "type"}} - list string {{.Option "list"}} + list string {{.Option "tag"}} } func (h {{.Option "name"}}) List(m *ice.Message, arg ...string) { h.{{.Option "type"}}.List(m, arg...) } -func init() { ice.Cmd("{{.Option "key"}}", &{{.Option "name"}}{}) } +func init() { ice.Cmd("{{.Option "key"}}", {{.Option "name"}}{}) } `, m) m.Cmd(nfs.SAVE, dir, string(buf)) } @@ -143,7 +143,7 @@ const AUTOGEN = "autogen" func init() { Index.Merge(&ice.Context{Commands: map[string]*ice.Command{ AUTOGEN: {Name: "autogen path auto create binpack script", Help: "生成", Action: map[string]*ice.Action{ - mdb.CREATE: {Name: "create main=src/main.go@key key= zone= type=Zone,Hash,List,Data name=hi list= help=", Help: "模块", Hand: func(m *ice.Message, arg ...string) { + mdb.CREATE: {Name: "create main=src/main.go@key key= zone= type=Zone,Hash,Data name=hi list= help=", Help: "模块", Hand: func(m *ice.Message, arg ...string) { _defs(m, "zone", m.Option("name"), "help", m.Option("name")) _defs(m, "key", kit.Keys("web.code", m.Option("zone"), m.Option("name"))) switch m.Option("type") { @@ -151,12 +151,10 @@ func init() { _defs(m, "list", "list zone id auto insert") case "Hash": _defs(m, "list", "list hash auto create") - case "List": - _defs(m, "list", "list id auto insert") case "Data": _defs(m, "list", "list path auto upload") } - m.Option("list", kit.Format("`name:\"%s\" help:\"%s\"`", m.Option("list"), m.Option("help"))) + m.Option("tag", kit.Format("`name:\"%s\" help:\"%s\"`", m.Option("list"), m.Option("help"))) if p := path.Join(kit.SSH_SRC, m.Option(kit.MDB_ZONE), kit.Keys(m.Option(kit.MDB_NAME), SHY)); !kit.FileExists(p) { _autogen_script(m, p) diff --git a/core/code/vimer.go b/core/code/vimer.go index 56de93c3..f0e43a14 100644 --- a/core/code/vimer.go +++ b/core/code/vimer.go @@ -33,7 +33,7 @@ func init() { nfs.SAVE: {Name: "save type file path", Help: "保存", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(nfs.SAVE, path.Join(m.Option(kit.MDB_PATH), m.Option(kit.MDB_FILE))) }}, - AUTOGEN: {Name: "create main=src/main.go@key key= zone= type=Zone,Hash,List,Data name=hi list= help=", Help: "模块", Hand: func(m *ice.Message, arg ...string) { + AUTOGEN: {Name: "create main=src/main.go@key key= zone= type=Zone,Hash,Data name=hi list= help=", Help: "模块", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(AUTOGEN, mdb.CREATE, arg) }}, COMPILE: {Name: "compile", Help: "编译", Hand: func(m *ice.Message, arg ...string) { diff --git a/render.go b/render.go index 82a0966f..fb9a0a51 100644 --- a/render.go +++ b/render.go @@ -59,7 +59,7 @@ func (m *Message) PushAnchor(arg ...interface{}) { // [name] link } func (m *Message) PushButton(arg ...string) { if !m.IsCliUA() { - m.Push(kit.MDB_ACTION, Render(m, RENDER_BUTTON, kit.Join(arg))) + m.Push(kit.MDB_ACTION, Render(m, RENDER_BUTTON, strings.ToLower(kit.Join(arg)))) } } func (m *Message) PushScript(arg ...string) *Message { // [type] text...