diff --git a/base/ssh/script.go b/base/ssh/script.go index 735695b3..164021bd 100644 --- a/base/ssh/script.go +++ b/base/ssh/script.go @@ -223,6 +223,11 @@ const ( func init() { Index.MergeCommands(ice.Commands{ + SHELL: {Name: "shell", Help: "交互命令", Actions: mdb.HashAction(), Hand: func(m *ice.Message, arg ...string) { + if f, ok := m.Target().Server().(*Frame); ok { + f.Spawn(m, m.Target()).Start(m, arg...) + } + }}, SOURCE: {Name: "source file run", Help: "脚本解析", Actions: mdb.HashAction(), Hand: func(m *ice.Message, arg ...string) { if f, ok := m.Target().Server().(*Frame); ok { f.Spawn(m, m.Target()).Start(m, arg...) diff --git a/core/code/go.go b/core/code/go.go index 33b31086..586eda94 100644 --- a/core/code/go.go +++ b/core/code/go.go @@ -124,7 +124,9 @@ func init() { GO: {Name: "go path auto", Help: "后端编程", Actions: ice.MergeActions(ice.Actions{ ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { m.Cmd(NAVIGATE, mdb.CREATE, GODOC, m.PrefixKey()) }}, mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) { - cmds, text := "ice.bin space dial dev ops", ctx.GetFileCmd(path.Join(arg[2], arg[1])) + cmds, text := "ice.bin source stdio", ctx.GetFileCmd(path.Join(arg[2], arg[1])) + ls := strings.Split(text, ice.PT) + text = "~" + kit.Join(kit.Slice(ls, 0, -1), ice.PT) + ice.NL + kit.Slice(ls, -1)[0] _xterm_show(m, cmds, text) }}, mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { diff --git a/core/code/shy.go b/core/code/shy.go index 4579e14b..a3fad36f 100644 --- a/core/code/shy.go +++ b/core/code/shy.go @@ -7,7 +7,6 @@ import ( ice "shylinux.com/x/icebergs" "shylinux.com/x/icebergs/base/ctx" "shylinux.com/x/icebergs/base/mdb" - "shylinux.com/x/icebergs/base/ssh" "shylinux.com/x/icebergs/base/web" kit "shylinux.com/x/toolkits" ) @@ -20,8 +19,11 @@ func init() { mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) { ctx.ProcessCommand(m, web.WIKI_WORD, kit.Simple(path.Join(arg[2], arg[1]))) }}, - mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(ssh.SOURCE, path.Join(arg[2], arg[1])) }}, - TEMPLATE: {Hand: func(m *ice.Message, arg ...string) { m.Echo(`chapter "hi"`) }}, + mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { + ctx.ProcessCommand(m, web.WIKI_WORD, kit.Simple(path.Join(arg[2], arg[1]))) + // m.Cmdy(ssh.SOURCE, path.Join(arg[2], arg[1])) + }}, + TEMPLATE: {Hand: func(m *ice.Message, arg ...string) { m.Echo(`chapter "hi"`) }}, }, PlugAction()), Hand: func(m *ice.Message, arg ...string) { if len(arg) > 0 && kit.Ext(arg[0]) == m.CommandKey() { m.Cmdy(web.WIKI_WORD, path.Join(ice.SRC, strings.TrimPrefix(arg[0], "src/")))