mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-01 11:13:24 +00:00
fix: check length of args in aliases resolve
this shouldnt be a problem.. but ... what
This commit is contained in:
parent
6d07d8db53
commit
4421869b85
@ -51,6 +51,11 @@ func (a *aliasModule) Resolve(cmdstr string) string {
|
|||||||
arg, _ := regexp.Compile(`[\\]?%\d+`)
|
arg, _ := regexp.Compile(`[\\]?%\d+`)
|
||||||
|
|
||||||
args, _ := splitInput(cmdstr)
|
args, _ := splitInput(cmdstr)
|
||||||
|
if len(args) == 0 {
|
||||||
|
// this shouldnt reach but...????
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for a.aliases[args[0]] != "" {
|
for a.aliases[args[0]] != "" {
|
||||||
alias := a.aliases[args[0]]
|
alias := a.aliases[args[0]]
|
||||||
alias = arg.ReplaceAllStringFunc(alias, func(a string) string {
|
alias = arg.ReplaceAllStringFunc(alias, func(a string) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user