1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-03 20:07:01 +08:00
This commit is contained in:
harveyshao 2022-01-10 00:26:21 +08:00
parent 22606ffaac
commit 7868ea57f2
3 changed files with 4 additions and 3 deletions

View File

@ -125,5 +125,5 @@ func PushStream(m *ice.Message) {
} }
func Format(tag string, arg ...interface{}) string { func Format(tag string, arg ...interface{}) string {
return kit.Format("<%s>%s</%s>", tag, strings.Join(kit.Simple(arg), "")) return kit.Format("<%s>%s</%s>", tag, strings.Join(kit.Simple(arg), ""), tag)
} }

View File

@ -21,6 +21,7 @@ const (
LOAD = "load" LOAD = "load"
AUTO = "auto" AUTO = "auto"
SHOW = "show" SHOW = "show"
PLAY = "play"
HELP = "help" HELP = "help"
HTTP = "http" HTTP = "http"
SAVE = "save" SAVE = "save"

View File

@ -35,7 +35,7 @@ func init() {
), ),
)}, )},
}, Commands: map[string]*ice.Command{ }, Commands: map[string]*ice.Command{
WORD: {Name: "word path=src/main.shy@key auto show", Help: "语言文字", Meta: kit.Dict( WORD: {Name: "word path=src/main.shy@key auto play", Help: "语言文字", Meta: kit.Dict(
ice.DisplayLocal(""), ice.DisplayLocal(""),
), Action: ice.MergeAction(map[string]*ice.Action{ ), Action: ice.MergeAction(map[string]*ice.Action{
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) { mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
@ -44,7 +44,7 @@ func init() {
web.STORY: {Name: "story", Help: "运行", Hand: func(m *ice.Message, arg ...string) { web.STORY: {Name: "story", Help: "运行", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(arg[0], ctx.ACTION, ice.RUN, arg[2:]) m.Cmdy(arg[0], ctx.ACTION, ice.RUN, arg[2:])
}}, }},
ice.SHOW: {Name: "show", Help: "演示"}, ice.PLAY: {Name: "play", Help: "演示"},
}, ctx.CmdAction()), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { }, ctx.CmdAction()), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Option(nfs.DIR_REG, m.Config(lex.REGEXP)) m.Option(nfs.DIR_REG, m.Config(lex.REGEXP))
if m.Option(nfs.DIR_DEEP, ice.TRUE); !_wiki_list(m, cmd, arg...) { if m.Option(nfs.DIR_DEEP, ice.TRUE); !_wiki_list(m, cmd, arg...) {