diff --git a/aliases.go b/aliases.go index fc5777e..c211729 100644 --- a/aliases.go +++ b/aliases.go @@ -51,6 +51,11 @@ func (a *aliasModule) Resolve(cmdstr string) string { arg, _ := regexp.Compile(`[\\]?%\d+`) args, _ := splitInput(cmdstr) + if len(args) == 0 { + // this shouldnt reach but...???? + return + } + for a.aliases[args[0]] != "" { alias := a.aliases[args[0]] alias = arg.ReplaceAllStringFunc(alias, func(a string) string {