1
0
forked from x/icebergs
This commit is contained in:
harveyshao 2022-10-28 14:16:44 +08:00
parent cfa411d9db
commit 816ea9f3b4
2 changed files with 8 additions and 2 deletions

View File

@ -50,7 +50,7 @@ const VIMER = "vimer"
func init() {
Index.MergeCommands(ice.Commands{
VIMER: {Name: "vimer path=src/ file=main.go line=1 list", Help: "编辑器", Actions: ice.Actions{
VIMER: {Name: "vimer path=src/@key file=main.go line=1 list", Help: "编辑器", Actions: ice.Actions{
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
switch m.Option(ctx.ACTION) {
case AUTOGEN, web.DREAM, XTERM:
@ -84,6 +84,9 @@ func init() {
m.Cmd(FAVOR, "_system_app").Tables(func(value ice.Maps) {
m.Push(nfs.PATH, "_open:"+strings.ToLower(value[mdb.NAME]))
})
case nfs.PATH:
m.Cmdy(nfs.DIR, arg[1:])
m.ProcessAgain()
default:
}
}

View File

@ -83,6 +83,9 @@ func init() {
}},
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(nfs.DIR, arg[1:], kit.Dict(nfs.DIR_REG, ".*\\.shy"))
m.ProcessAgain()
return
for _, p := range []string{"src/", "src/help/", "usr/icebergs/", "usr/linux-story/", "usr/nginx-story/", "usr/golang-story/", "usr/redis-story/", "usr/mysql-story/"} {
m.Cmdy(nfs.DIR, p, kit.Dict(nfs.DIR_DEEP, ice.TRUE, nfs.DIR_REG, ".*\\.shy"), nfs.DIR_CLI_FIELDS)
}