forked from x/ContextOS
tce fix cli.source加载文件失败
This commit is contained in:
parent
f0d27ab53b
commit
9416b86ed6
@ -1 +1,2 @@
|
|||||||
~aaa login root root
|
~aaa login root root
|
||||||
|
source etc/local.shy
|
||||||
|
@ -646,7 +646,7 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心",
|
|||||||
}},
|
}},
|
||||||
"source": &ctx.Command{Name: "source file", Help: "运行脚本, file: 脚本文件名", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
"source": &ctx.Command{Name: "source file", Help: "运行脚本, file: 脚本文件名", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
if _, ok := m.Target().Server.(*CLI); m.Assert(ok) && !m.Caps("skip") { // {{{
|
if _, ok := m.Target().Server.(*CLI); m.Assert(ok) && !m.Caps("skip") { // {{{
|
||||||
m.Start(fmt.Sprintf("%s%d", key, m.Optioni("level", m.Capi("level")+1)), "脚本文件", arg[0])
|
m.Start(fmt.Sprintf("%s_%d_%s", key, m.Optioni("level", m.Capi("level")+1), arg[0]), "脚本文件", arg[0])
|
||||||
} // }}}
|
} // }}}
|
||||||
}},
|
}},
|
||||||
"return": &ctx.Command{Name: "return result...", Help: "结束脚本, rusult: 返回值", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
"return": &ctx.Command{Name: "return result...", Help: "结束脚本, rusult: 返回值", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user