package wiki
import (
"strings"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/ssh"
kit "shylinux.com/x/toolkits"
)
func _spark_show(m *ice.Message, name, text string, arg ...string) {
if name == "" {
_wiki_template(m, SPARK, name, text, arg...)
return
}
prompt := kit.Select(name+"> ", m.Config(kit.Keys(ssh.PROMPT, name)))
m.Echo(`
`, arg[0])}
for _, l := range strings.Split(strings.Join(arg[1:], ice.NL), ice.NL) {
switch list = append(list, "
"); arg[0] {
case SHELL:
list = append(list, "")
default:
list = append(list, "")
}
list = append(list, "", l, "")
list = append(list, "
")
}
list = append(list, "
")
return strings.Join(list, "")
})
}},
SPARK: {Name: "spark [name] text", Help: "段落", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if len(arg) == 0 {
m.Echo(`