forked from x/icebergs
add some
This commit is contained in:
parent
d8c381a933
commit
63cbd6d4c0
@ -1,7 +1,6 @@
|
||||
package nfs
|
||||
|
||||
import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
@ -20,13 +19,15 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
GREP: {Name: "grep word file auto", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, ice.MAIN) })
|
||||
m.Options(mdb.VALUE, arg[0], CMD_DIR, kit.Select("", arg, 2))
|
||||
kit.For(strings.Split(m.System(GREP, "--exclude=.[a-z]*", "--exclude-dir=.[a-z]*", "-rni", arg[0], path.Join(kit.Select(SRC, arg, 1))).Result(), ice.NL), func(s string) {
|
||||
kit.If(len(arg) == 1, func() { arg = append(arg, ice.SRC) })
|
||||
m.Options(mdb.VALUE, arg[0])
|
||||
kit.For(kit.SplitLine(m.System(GREP, "--exclude=.[a-z]*", "--exclude-dir=.[a-z]*", "-rni", arg[0], kit.AddUniq([]string{}, arg[1:]...)).Result()), func(s string) {
|
||||
if ls := strings.SplitN(s, DF, 3); len(ls) > 2 {
|
||||
m.Push(FILE, strings.TrimPrefix(ls[0], PWD)).Push(LINE, ls[1]).Push(mdb.TEXT, ls[2])
|
||||
_ls := SplitPath(m, ls[0])
|
||||
m.Push(PATH, _ls[0]).Push(FILE, _ls[1]).Push(LINE, ls[1]).Push(mdb.TEXT, ls[2])
|
||||
}
|
||||
})
|
||||
m.StatusTimeCount(kit.Dict(PATH, m.Option(CMD_DIR)))
|
||||
m.Sort("path,file,line")
|
||||
}},
|
||||
})
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ Volcanos(chat.ONEXPORT, {
|
||||
tabs: function(can) {
|
||||
var list = can.page.Select(can, can.ui.menu._output, html.DIV_TABS, function(target) { return {
|
||||
select: can.page.ClassList.has(can, target, html.SELECT),
|
||||
name: can.page.SelectOne(can, target, html.SPAN_NAME).innerHTML,
|
||||
name: can.page.SelectOne(can, target, html.SPAN).innerHTML,
|
||||
list: can.page.SelectChild(can, target._desktop, html.FIELDSET, function(target) { return target._meta })
|
||||
} }); can.misc.sessionStorage(can, [can.ConfIndex(), html.TABS], JSON.stringify(list))
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user