diff --git a/CHANGELOG.md b/CHANGELOG.md index 6645d80..2db665b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Documented custom userdata types (Job and Timer Objects) - Coming with fix is also adding the return types for some functions that were missing it +### Fixed +- `hilbish.which` not working correctly with aliases + ## [2.0.1] - 2022-12-28 ### Fixed - Corrected documentation for hooks, removing outdated `command.no-perm` diff --git a/api.go b/api.go index d5a3fa4..3920e6f 100644 --- a/api.go +++ b/api.go @@ -551,7 +551,10 @@ func hlwhich(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { return nil, err } - cmd := aliases.Resolve(name) + // itll return either the original command or what was passed + // if name isnt empty its not an issue + alias := aliases.Resolve(name) + cmd := strings.Split(alias, " ")[0] // check for commander if commands[cmd] != nil {