forked from x/ContextOS
Merge branch 'master' of https://github.com/shylinux/context
This commit is contained in:
commit
d28be437e1
@ -2908,7 +2908,8 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
||||
m.Add("append", "res", msg.Result(0))
|
||||
} else {
|
||||
m.Add("append", "index", i)
|
||||
m.Add("append", "command", fmt.Sprintf("%s: %s", c.Help, strings.Replace(c.Name, "\n", "\\n", -1)))
|
||||
m.Add("append", "help", fmt.Sprintf("%s", c.Help))
|
||||
m.Add("append", "command", fmt.Sprintf("%s", strings.Replace(c.Name, "\n", "\\n", -1)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2935,18 +2936,20 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
|
||||
m.target.Commands[m.Cap("list_count")] = &Command{Name: strings.Join(arg, " "), Help: list_help, Hand: func(cmd *Message, c *Context, key string, args ...string) {
|
||||
list := []string{}
|
||||
for _, v := range arg {
|
||||
if v == "_" {
|
||||
if len(args) > 0 {
|
||||
v, args = args[0], args[1:]
|
||||
} else {
|
||||
v = "''"
|
||||
}
|
||||
} else if v == "__" {
|
||||
if v == "__" {
|
||||
if len(args) > 0 {
|
||||
v, args = args[0], args[1:]
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
} else if strings.HasPrefix(v, "_") {
|
||||
if len(args) > 0 {
|
||||
v, args = args[0], args[1:]
|
||||
} else if len(v) > 1 {
|
||||
v = v[1:]
|
||||
} else {
|
||||
v = "''"
|
||||
}
|
||||
}
|
||||
list = append(list, v)
|
||||
}
|
||||
|
@ -19,9 +19,9 @@ import (
|
||||
|
||||
// 应用层
|
||||
_ "examples/code" //代码中心
|
||||
_ "examples/jira" //任务中心
|
||||
_ "examples/lark" //会议中心
|
||||
_ "examples/mall" //交易中心
|
||||
// _ "examples/jira" //任务中心
|
||||
// _ "examples/lark" //会议中心
|
||||
// _ "examples/mall" //交易中心
|
||||
_ "examples/wiki" //文档中心
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user