diff --git a/base/ctx/command.go b/base/ctx/command.go index 2d8a846d..84da2d02 100644 --- a/base/ctx/command.go +++ b/base/ctx/command.go @@ -20,7 +20,7 @@ func _command_list(m *ice.Message, name string) *ice.Message { m.Spawn(m.Source()).Search(name, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) { icon := kit.Format(kit.Value(cmd.Meta, kit.Keys(ice.CTX_ICONS, key))) m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key)) - m.Push(mdb.ICONS, kit.Select(cmd.Icon, icon, !strings.HasPrefix(icon, "bi "))) + m.Push(mdb.ICONS, kit.Select(cmd.Icon, icon, !kit.HasPrefix(icon, "bi ", "{"))) m.Push(mdb.NAME, kit.Format(cmd.Name)).Push(mdb.HELP, kit.Format(cmd.Help)) m.Push(mdb.LIST, kit.Format(cmd.List)).Push(mdb.META, kit.Format(cmd.Meta)) m.Push("_command", ShortCmd(kit.Keys(s.Prefix(), key))) diff --git a/render.go b/render.go index 80424488..efb5b220 100644 --- a/render.go +++ b/render.go @@ -270,7 +270,7 @@ func (m *Message) Resource(file string, arg ...string) string { return m.resource(file) } func (m *Message) resource(file string) string { - p := kit.FileLines(3) + p := kit.FileLines(-1) kit.If(file == "", func() { p = kit.ExtChange(p, JS) }, func() { if kit.HasPrefix(file, PS, HTTP) { p = file