mirror of
https://shylinux.com/x/icebergs
synced 2025-07-01 04:14:42 +08:00
24 lines
835 B
Go
24 lines
835 B
Go
package macos
|
|
|
|
import (
|
|
ice "shylinux.com/x/icebergs"
|
|
"shylinux.com/x/icebergs/base/aaa"
|
|
"shylinux.com/x/icebergs/base/mdb"
|
|
"shylinux.com/x/icebergs/core/code"
|
|
)
|
|
|
|
const APPLICATIONS = "applications"
|
|
|
|
func init() {
|
|
Index.MergeCommands(ice.Commands{
|
|
APPLICATIONS: {Help: "应用", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
|
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { FinderAppend(m, APPLICATIONS, m.PrefixKey()) }},
|
|
code.INSTALL: {Hand: func(m *ice.Message, arg ...string) { AppInstall(m, arg[0], arg[1]) }},
|
|
mdb.CREATE: {Name: "create space index args name icon"},
|
|
}, PodCmdAction(), CmdHashAction("space,index,args"), mdb.ClearOnExitHashAction())},
|
|
})
|
|
}
|
|
func AppInstall(m *ice.Message, icon, index string, arg ...string) string {
|
|
return install(m, APPLICATIONS, icon, index, arg...)
|
|
}
|