1
0
forked from x/icebergs
This commit is contained in:
shaoying 2020-07-23 14:08:54 +08:00
parent 7d3dcb2670
commit 05ad115ec8
2 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
RUNTIME: {Name: "runtime", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
switch kit.Select("", arg, 0) {
case "hostinfo":
case "hostname":
m.Conf(RUNTIME, "boot.hostname", arg[1])
HostName = arg[1]

View File

@ -211,7 +211,7 @@ func _order_show(m *ice.Message, name, text string, arg ...string) {
func _table_show(m *ice.Message, name, text string, arg ...string) {
head, list := []string{}, [][]string{}
for i, v := range kit.Split(strings.TrimSpace(text), "\n") {
if i == 0 {
if v = strings.ReplaceAll(v, "%", "%%"); i == 0 {
head = kit.Split(v)
} else {
line := kit.Split(v)