mirror of
https://shylinux.com/x/icebergs
synced 2025-04-29 10:39:21 +08:00
opt route
This commit is contained in:
parent
188bdbc6e3
commit
9b11b4aa20
@ -115,6 +115,7 @@ func init() {
|
|||||||
m.Option(ice.MSG_PROCESS, ice.PROCESS_INNER)
|
m.Option(ice.MSG_PROCESS, ice.PROCESS_INNER)
|
||||||
}},
|
}},
|
||||||
ctx.COMMAND: {Name: "command", Help: "命令", Hand: func(m *ice.Message, arg ...string) {
|
ctx.COMMAND: {Name: "command", Help: "命令", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.Debug(m.Option(ROUTE))
|
||||||
m.Cmdy(SPACE, m.Option(ROUTE), kit.Keys(m.Option(kit.SSH_CTX), m.Option(kit.SSH_CMD)), arg)
|
m.Cmdy(SPACE, m.Option(ROUTE), kit.Keys(m.Option(kit.SSH_CTX), m.Option(kit.SSH_CMD)), arg)
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
@ -124,7 +125,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if len(arg) > 2 { // 加载插件
|
} else if len(arg) > 2 { // 加载插件
|
||||||
m.ShowPlugin(arg[0], arg[1], arg[2], ctx.COMMAND)
|
m.ShowPlugin(arg[0], arg[1], arg[2], kit.MDB_ACTION, ctx.COMMAND)
|
||||||
|
|
||||||
} else if len(arg) > 1 { // 命令列表
|
} else if len(arg) > 1 { // 命令列表
|
||||||
m.Cmd(SPACE, arg[0], ctx.CONTEXT, arg[1], ctx.COMMAND).Table(func(index int, value map[string]string, head []string) {
|
m.Cmd(SPACE, arg[0], ctx.CONTEXT, arg[1], ctx.COMMAND).Table(func(index int, value map[string]string, head []string) {
|
||||||
|
@ -91,6 +91,10 @@ func init() {
|
|||||||
FAVOR: {Name: "favor insert", Help: "收藏"},
|
FAVOR: {Name: "favor insert", Help: "收藏"},
|
||||||
mdb.INPUTS: {Name: "favor inputs", Help: "补全"},
|
mdb.INPUTS: {Name: "favor inputs", Help: "补全"},
|
||||||
nfs.DIR: {Name: "dir", Help: "目录"},
|
nfs.DIR: {Name: "dir", Help: "目录"},
|
||||||
|
|
||||||
|
"project": {Name: "project", Help: "项目", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.Cmdy(nfs.DIR, kit.Select("./", arg, 0))
|
||||||
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if len(arg) < 2 {
|
if len(arg) < 2 {
|
||||||
m.Cmdy(nfs.DIR, kit.Select("./", arg, 0))
|
m.Cmdy(nfs.DIR, kit.Select("./", arg, 0))
|
||||||
|
@ -15,7 +15,7 @@ const PLAN = "plan"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.Merge(&ice.Context{
|
Index.Merge(&ice.Context{
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
PLAN: {Name: "plan scale=day,week,month,year,long begin_time@date auto insert export import", Help: "计划", Meta: kit.Dict(
|
PLAN: {Name: "plan scale=day,week,month,year,long begin_time@date where@province auto insert export import", Help: "计划", Meta: kit.Dict(
|
||||||
"display", "/plugin/local/team/plan.js", "style", "plan",
|
"display", "/plugin/local/team/plan.js", "style", "plan",
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
mdb.INSERT: {Name: "insert zone type=once,step,week name text begin_time@date close_time@date", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INSERT: {Name: "insert zone type=once,step,week name text begin_time@date close_time@date", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -79,7 +79,9 @@ var Index = &ice.Context{Name: ALPHA, Help: "英汉词典",
|
|||||||
_alpha_load(m, m.Option(kit.MDB_FILE), kit.Select(path.Base(m.Option(kit.MDB_FILE)), m.Option(kit.MDB_NAME)))
|
_alpha_load(m, m.Option(kit.MDB_FILE), kit.Select(path.Base(m.Option(kit.MDB_FILE)), m.Option(kit.MDB_NAME)))
|
||||||
}},
|
}},
|
||||||
mdb.SEARCH: {Name: "search type name text", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
mdb.SEARCH: {Name: "search type name text", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
if arg[0] == ALPHA {
|
||||||
_alpha_find(m, kit.Select("word", arg, 2), arg[1])
|
_alpha_find(m, kit.Select("word", arg, 2), arg[1])
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
m.Option(mdb.FIELDS, "id,word,translation,definition")
|
m.Option(mdb.FIELDS, "id,word,translation,definition")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user