1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
icebergs/base/nfs/find.go
2022-08-01 18:09:36 +08:00

20 lines
399 B
Go

package nfs
import (
"strings"
ice "shylinux.com/x/icebergs"
)
const FIND = "find"
func init() {
Index.MergeCommands(ice.Commands{
FIND: {Name: "find path word auto", Help: "搜索", Hand: func(m *ice.Message, 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))
}
}},
})
}