1
0
forked from x/icebergs
icebergs/core/chat/macos/opens.go
2023-05-03 23:23:49 +08:00

21 lines
387 B
Go

package macos
import (
"strings"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/cli"
)
const OPENS = "opens"
func init() {
Index.MergeCommands(ice.Commands{
OPENS: {Name: "open app auto", Hand: func(m *ice.Message, arg ...string) {
if strings.HasPrefix(m.Option(ice.MSG_USERWEB), "http://localhost:") {
m.Cmd(cli.SYSTEM, "open", "-a", arg)
}
}},
})
}