2
2
spegling av https://github.com/Hilbis/Hilbish synced 2025-07-05 18:42:04 +00:00

Jämför commits

...

2 Incheckningar

Upphovsman SHA1 Meddelande Datum
a5b6fc8eda
fix: return cmdstr in alias resolve instead of nothing 2023-09-30 23:25:15 -04:00
4421869b85
fix: check length of args in aliases resolve
this shouldnt be a problem.. but ... what
2023-09-30 23:21:00 -04:00

Visa fil

@ -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 cmdstr
}
for a.aliases[args[0]] != "" {
alias := a.aliases[args[0]]
alias = arg.ReplaceAllStringFunc(alias, func(a string) string {