forked from x/icebergs
21 lines
387 B
Go
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)
|
|
}
|
|
}},
|
|
})
|
|
}
|