diff --git a/core/team/plan.go b/core/team/plan.go index 8a71ab13..f017e623 100644 --- a/core/team/plan.go +++ b/core/team/plan.go @@ -21,18 +21,28 @@ func init() { 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) { _task_create(m, arg[1]) _task_insert(m, arg[1], arg[2:]...) + m.Set(ice.MSG_RESULT) + m.Cmdy(m.Prefix(PLAN), m.Option("scale")) }}, mdb.MODIFY: {Name: "modify", Help: "编辑", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, m.Option(kit.MDB_ZONE), m.Option(kit.MDB_ID), arg[0], arg[1]) + m.Set(ice.MSG_RESULT) + m.Cmdy(m.Prefix(PLAN), m.Option("scale")) }}, mdb.DELETE: {Name: "delete", Help: "删除", Hand: func(m *ice.Message, arg ...string) { _task_delete(m, m.Option(kit.MDB_ZONE), m.Option(kit.MDB_ID)) + m.Set(ice.MSG_RESULT) + m.Cmdy(m.Prefix(PLAN), m.Option("scale")) }}, mdb.EXPORT: {Name: "export file", Help: "导出", Hand: func(m *ice.Message, arg ...string) { _task_export(m, m.Option(kit.MDB_FILE)) + m.Set(ice.MSG_RESULT) + m.Cmdy(m.Prefix(PLAN), m.Option("scale")) }}, mdb.IMPORT: {Name: "import file", Help: "导入", Hand: func(m *ice.Message, arg ...string) { _task_import(m, m.Option(kit.MDB_FILE)) + m.Set(ice.MSG_RESULT) + m.Cmdy(m.Prefix(PLAN), m.Option("scale")) }}, mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) { switch arg[0] { diff --git a/core/wiki/word.go b/core/wiki/word.go index 0a69c239..d5196a61 100644 --- a/core/wiki/word.go +++ b/core/wiki/word.go @@ -82,7 +82,11 @@ func _brief_show(m *ice.Message, name, text string, arg ...string) { func _refer_show(m *ice.Message, name, text string, arg ...string) { list := [][]string{} for _, v := range kit.Split(strings.TrimSpace(text), "\n", "\n") { - list = append(list, kit.Split(v)) + if ls := kit.Split(v); len(ls) == 1 { + list = append(list, []string{path.Base(ls[0]), ls[0]}) + } else { + list = append(list, ls) + } } m.Optionv("list", list) diff --git a/misc/git/git.go b/misc/git/git.go index a0cf3865..0c511bdc 100644 --- a/misc/git/git.go +++ b/misc/git/git.go @@ -30,13 +30,17 @@ var Index = &ice.Context{Name: GIT, Help: "代码库", // 系统项目 wd, _ := os.Getwd() _repos_insert(m, path.Base(wd), wd) - }}, - "init": {Name: "init", Help: "初始化", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { - // 官方项目 + m.Cmd(nfs.DIR, "usr", "name path").Table(func(index int, value map[string]string, head []string) { _repos_insert(m, value["name"], value["path"]) }) }}, + "init": {Name: "init", Help: "初始化", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + // 官方项目 + // m.Cmd(nfs.DIR, "usr", "name path").Table(func(index int, value map[string]string, head []string) { + // _repos_insert(m, value["name"], value["path"]) + // }) + }}, GIT: {Name: "git port=auto path=auto auto 启动 构建 下载", Help: "代码库", Action: map[string]*ice.Action{ "download": {Name: "download", Help: "下载", Hand: func(m *ice.Message, arg ...string) {