mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt inner.go
This commit is contained in:
parent
c27f669787
commit
e5c6fee92b
@ -101,7 +101,15 @@ func init() {
|
|||||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
switch arg[0] {
|
switch arg[0] {
|
||||||
case nfs.PATH:
|
case nfs.PATH:
|
||||||
m.Cmdy(nfs.DIR, kit.Select(nfs.PWD, arg, 1), nfs.DIR_CLI_FIELDS).ProcessAgain()
|
p := kit.Select(nfs.PWD, arg, 1)
|
||||||
|
m.Cmdy(nfs.DIR, p, nfs.DIR_CLI_FIELDS).Sort(nfs.PATH).ProcessAgain()
|
||||||
|
if strings.HasPrefix(p, "usr/icebergs/core/") && len(kit.Split(p, ice.PS)) > 3 {
|
||||||
|
p = strings.Replace(p, "usr/icebergs/core/", "usr/volcanos/plugin/local/", 1)
|
||||||
|
m.Cmdy(nfs.DIR, p, nfs.DIR_CLI_FIELDS).Sort(nfs.PATH)
|
||||||
|
} else if strings.HasPrefix(p, "usr/volcanos/plugin/local/") && len(kit.Split(p, ice.PS)) > 4 {
|
||||||
|
p = strings.Replace(p, "usr/volcanos/plugin/local/", "usr/icebergs/core/", 1)
|
||||||
|
m.Cmdy(nfs.DIR, p, nfs.DIR_CLI_FIELDS).SortStrR(nfs.PATH)
|
||||||
|
}
|
||||||
case nfs.FILE:
|
case nfs.FILE:
|
||||||
p := kit.Select(nfs.PWD, arg, 1)
|
p := kit.Select(nfs.PWD, arg, 1)
|
||||||
m.Option(nfs.DIR_ROOT, m.Option(nfs.PATH))
|
m.Option(nfs.DIR_ROOT, m.Option(nfs.PATH))
|
||||||
|
@ -85,8 +85,7 @@ func init() {
|
|||||||
m.Push(nfs.PATH, "_open:"+strings.ToLower(value[mdb.NAME]))
|
m.Push(nfs.PATH, "_open:"+strings.ToLower(value[mdb.NAME]))
|
||||||
})
|
})
|
||||||
case nfs.PATH:
|
case nfs.PATH:
|
||||||
m.Cmdy(nfs.DIR, arg[1:]).Cut("path,size,time")
|
m.Cmdy(INNER, mdb.INPUTS, arg).Cut("path,size,time")
|
||||||
m.ProcessAgain()
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,8 @@ func WikiAction(dir string, ext ...string) ice.Actions {
|
|||||||
case nfs.PATH:
|
case nfs.PATH:
|
||||||
m.Option(nfs.DIR_REG, m.Config(lex.REGEXP))
|
m.Option(nfs.DIR_REG, m.Config(lex.REGEXP))
|
||||||
m.Cmdy(nfs.DIR, path.Join(m.Config(nfs.PATH), kit.Select("", arg, 1)))
|
m.Cmdy(nfs.DIR, path.Join(m.Config(nfs.PATH), kit.Select("", arg, 1)))
|
||||||
|
case ctx.INDEX:
|
||||||
|
m.Cmdy(ctx.COMMAND, mdb.SEARCH, ctx.COMMAND)
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user