diff --git a/base/ctx/command.go b/base/ctx/command.go index 1ea145cb..2d8a846d 100644 --- a/base/ctx/command.go +++ b/base/ctx/command.go @@ -18,8 +18,9 @@ func _command_list(m *ice.Message, name string) *ice.Message { return m.Push(mdb.INDEX, name).Push(mdb.NAME, name).Push(mdb.HELP, "").Push(mdb.META, "").Push(mdb.LIST, "") } 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, kit.Value(cmd.Meta, kit.Keys(ice.CTX_ICONS, key)))) + m.Push(mdb.ICONS, kit.Select(cmd.Icon, icon, !strings.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)))