forked from x/icebergs
opt inner.js
This commit is contained in:
parent
06bffb9218
commit
b31a217baf
@ -13,6 +13,7 @@ const GREP = "grep"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
GREP: {Name: "grep word path auto", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
GREP: {Name: "grep word path auto", Help: "搜索", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.Option(mdb.VALUE, arg[0])
|
||||||
m.Option("cmd_dir", kit.Select(m.Option(PATH), arg, 1))
|
m.Option("cmd_dir", kit.Select(m.Option(PATH), arg, 1))
|
||||||
for _, line := range strings.Split(m.Cmdx("cli.system", GREP, "--exclude=.[a-z]*", "--exclude-dir=.[a-z]*", "--exclude-dir=node_modules", "-rni", arg[0], ice.PT), ice.NL) {
|
for _, line := range strings.Split(m.Cmdx("cli.system", GREP, "--exclude=.[a-z]*", "--exclude-dir=.[a-z]*", "--exclude-dir=node_modules", "-rni", arg[0], ice.PT), ice.NL) {
|
||||||
if ls := strings.SplitN(line, ice.DF, 3); len(ls) > 2 {
|
if ls := strings.SplitN(line, ice.DF, 3); len(ls) > 2 {
|
||||||
|
@ -62,7 +62,8 @@ func _go_exec(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func _go_show(m *ice.Message, arg ...string) {
|
func _go_show(m *ice.Message, arg ...string) {
|
||||||
// TagsList(m, "gotags", path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))
|
// TagsList(m, "gotags", path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))
|
||||||
TagsList(m, "gotags", path.Join(arg[2], arg[1]))
|
// TagsList(m, "gotags", path.Join(arg[2], arg[1]))
|
||||||
|
_go_exec(m, arg...)
|
||||||
}
|
}
|
||||||
func _mod_show(m *ice.Message, file string) {
|
func _mod_show(m *ice.Message, file string) {
|
||||||
const (
|
const (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user