1
0
forked from x/icebergs

opt inner.js

This commit is contained in:
harveyshao 2023-01-25 23:13:35 +08:00
parent 06bffb9218
commit b31a217baf
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ const GREP = "grep"
func init() {
Index.MergeCommands(ice.Commands{
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))
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 {

View File

@ -62,7 +62,8 @@ func _go_exec(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(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) {
const (