mirror of https://github.com/Hilbis/Hilbish
fix: make hilbish.which work properly with aliases
parent
71d23a4727
commit
8d20ad9eed
|
@ -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`
|
||||
|
|
5
api.go
5
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 {
|
||||
|
|
Loading…
Reference in New Issue