mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
opt inner.js
This commit is contained in:
parent
fdc1b5420a
commit
d28a1e674a
@ -155,12 +155,6 @@ func ZoneAction(args ...interface{}) map[string]*ice.Action {
|
|||||||
m.Cmdy("context", kit.Select(m.Option(ice.CTX), m.Option(kit.Keys(EXTRA, ice.CTX))), "command")
|
m.Cmdy("context", kit.Select(m.Option(ice.CTX), m.Option(kit.Keys(EXTRA, ice.CTX))), "command")
|
||||||
case ice.ARG:
|
case ice.ARG:
|
||||||
|
|
||||||
case "path":
|
|
||||||
m.Cmdy("nfs.dir", arg[1:]).Cut("path,size,time").ProcessAgain()
|
|
||||||
case "file":
|
|
||||||
m.Option("dir_root", m.Option("path"))
|
|
||||||
m.Cmdy("nfs.dir", arg[1:]).Cut("path,size,time").ProcessAgain()
|
|
||||||
|
|
||||||
case "index":
|
case "index":
|
||||||
m.OptionFields(arg[0])
|
m.OptionFields(arg[0])
|
||||||
m.Cmdy("command", SEARCH, "command", kit.Select("", arg, 1))
|
m.Cmdy("command", SEARCH, "command", kit.Select("", arg, 1))
|
||||||
|
@ -123,7 +123,10 @@ const (
|
|||||||
BRANCH = "branch"
|
BRANCH = "branch"
|
||||||
REPOS = "repos"
|
REPOS = "repos"
|
||||||
|
|
||||||
|
// SAVE = "save"
|
||||||
LOAD = "load"
|
LOAD = "load"
|
||||||
|
FIND = "find"
|
||||||
|
GREP = "grep"
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
HTML = "html"
|
HTML = "html"
|
||||||
|
@ -89,7 +89,21 @@ func init() {
|
|||||||
mdb.ENGINE: {Name: "engine", Help: "引擎", Hand: func(m *ice.Message, arg ...string) {
|
mdb.ENGINE: {Name: "engine", Help: "引擎", Hand: func(m *ice.Message, arg ...string) {
|
||||||
_inner_exec(m, arg[0], arg[1], arg[2])
|
_inner_exec(m, arg[0], arg[1], arg[2])
|
||||||
}},
|
}},
|
||||||
mdb.INPUTS: {Name: "favor inputs", Help: "补全"},
|
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
switch arg[0] {
|
||||||
|
case nfs.PATH:
|
||||||
|
m.Cmdy(nfs.DIR, arg[1:], "path,size,time").ProcessAgain()
|
||||||
|
case nfs.FILE:
|
||||||
|
m.Option(nfs.DIR_ROOT, m.Option(nfs.PATH))
|
||||||
|
m.Cmdy(nfs.DIR, ice.PWD, "path,size,time").ProcessAgain()
|
||||||
|
case "url":
|
||||||
|
m.Option(nfs.DIR_DEEP, ice.TRUE)
|
||||||
|
m.Option(nfs.DIR_ROOT, "usr/volcanos/plugin/local/code/")
|
||||||
|
m.Cmdy(nfs.DIR, ice.PWD, "path,size,time").ProcessAgain()
|
||||||
|
default:
|
||||||
|
m.Cmdy(FAVOR, mdb.INPUTS, arg)
|
||||||
|
}
|
||||||
|
}},
|
||||||
FAVOR: {Name: "favor", Help: "收藏"},
|
FAVOR: {Name: "favor", Help: "收藏"},
|
||||||
}, ctx.CmdAction()), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, ctx.CmdAction()), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if !strings.HasSuffix(arg[0], ice.PS) {
|
if !strings.HasSuffix(arg[0], ice.PS) {
|
||||||
@ -103,7 +117,7 @@ func init() {
|
|||||||
m.Set(ice.MSG_STATUS)
|
m.Set(ice.MSG_STATUS)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Option("plug", "inner/search.js?a=1,inner/favor.js,inner/sess.js")
|
m.Option("plug", "inner/search.js?a=1,inner/favor.js")
|
||||||
arg[1] = kit.Split(arg[1])[0]
|
arg[1] = kit.Split(arg[1])[0]
|
||||||
_inner_list(m, kit.Ext(arg[1]), arg[1], arg[0])
|
_inner_list(m, kit.Ext(arg[1]), arg[1], arg[0])
|
||||||
m.Set(ice.MSG_STATUS)
|
m.Set(ice.MSG_STATUS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user