aboutsummaryrefslogtreecommitdiff
path: root/internal/object
diff options
context:
space:
mode:
Diffstat (limited to 'internal/object')
-rw-r--r--internal/object/item.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/object/item.go b/internal/object/item.go
index 67a2998..84e43b1 100644
--- a/internal/object/item.go
+++ b/internal/object/item.go
@@ -53,8 +53,8 @@ func (d *ItemDef) MatchesName(input string) bool {
if strings.ToLower(d.Name) == lower {
return true
}
- for _, a := range d.Aliases {
- if strings.ToLower(a) == lower {
+ for _, word := range strings.Fields(d.Name) {
+ if strings.HasPrefix(strings.ToLower(word), lower) {
return true
}
}