mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt find.go
This commit is contained in:
parent
b23fe02af5
commit
5676ceaf3e
19
base/nfs/find.go
Normal file
19
base/nfs/find.go
Normal file
@ -0,0 +1,19 @@
|
||||
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, ice.PWD, "-name", arg[1]), ice.NL) {
|
||||
m.Push(FILE, strings.TrimPrefix(file, ice.PWD))
|
||||
}
|
||||
}},
|
||||
}})
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user