forked from x/ContextOS
mac fix bug
This commit is contained in:
parent
e4cf27d202
commit
1ca7a7875d
@ -162,8 +162,12 @@ func (cli *CLI) Start(m *ctx.Message, arg ...string) bool { // {{{
|
||||
}, "parse", arg[1]).Target().Name)
|
||||
|
||||
if arg[1] == "stdio" {
|
||||
msg := m.Spawn().Cmd("source", m.Conf("init.shy"))
|
||||
msg.Result(0, msg.Meta["return"])
|
||||
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
|
||||
}
|
||||
|
@ -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: 加权选择"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user