1
0
forked from x/ContextOS

mac fix bug

This commit is contained in:
shaoying 2018-07-30 01:54:41 +08:00
parent e4cf27d202
commit 1ca7a7875d
2 changed files with 7 additions and 3 deletions

View File

@ -162,8 +162,12 @@ func (cli *CLI) Start(m *ctx.Message, arg ...string) bool { // {{{
}, "parse", arg[1]).Target().Name)
if arg[1] == "stdio" {
if _, e := os.Stat(m.Conf("init.shy")); e == nil {
msg := m.Spawn().Cmd("source", m.Conf("init.shy"))
msg.Result(0, msg.Meta["return"])
} else {
m.Spawn().Cmd("alias", "import", "nfs")
}
}
return false
}

View File

@ -1777,7 +1777,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心",
"nmessage": &Cache{Name: "nmessage", Value: "0", Help: "消息数量"},
},
Configs: map[string]*Config{
"debug": &Config{Name: "debug(on/off)", Value: "on", Help: "调试模式on:打印off:不打印)"},
"debug": &Config{Name: "debug(on/off)", Value: "off", Help: "调试模式on:打印off:不打印)"},
"search_method": &Config{Name: "search_method(find/search)", Value: "search", Help: "搜索方法, find: 模块名精确匹配, search: 模块名或帮助信息模糊匹配"},
"search_choice": &Config{Name: "search_choice(first/last/rand/magic)", Value: "magic", Help: "搜索匹配, first: 匹配第一个模块, last: 匹配最后一个模块, rand: 随机选择, magic: 加权选择"},