diff --git a/src/contexts/cli/cli.go b/src/contexts/cli/cli.go index a3601de1..c987ce95 100644 --- a/src/contexts/cli/cli.go +++ b/src/contexts/cli/cli.go @@ -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 } diff --git a/src/contexts/ctx.go b/src/contexts/ctx.go index 73a6da20..03d01b25 100644 --- a/src/contexts/ctx.go +++ b/src/contexts/ctx.go @@ -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: 加权选择"},