1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 17:44:05 +08:00
icebergs/base/nfs/find.go
2022-02-06 20:15:58 +08:00

20 lines
454 B
Go

package nfs
import (
"strings"
ice "shylinux.com/x/icebergs"
)
const FIND = "find"
func init() {
Index.Merge(&ice.Context{Commands: map[string]*ice.Command{
FIND: {Name: "find path word auto", Help: "搜索", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
for _, file := range strings.Split(m.Cmdx("cli.system", FIND, PWD, "-name", arg[1]), ice.NL) {
m.Push(FILE, strings.TrimPrefix(file, PWD))
}
}},
}})
}