2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-20 20:43:23 +00:00

fix: use splitInput function to split alias args

this makes it so that quoted text is a single arg in the slice
This commit is contained in:
sammyette 2023-07-11 18:56:58 -04:00
parent 68ffe73328
commit 0a751a4d23
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

View File

@ -50,7 +50,7 @@ func (a *aliasModule) Resolve(cmdstr string) string {
arg, _ := regexp.Compile(`[\\]?%\d+`)
args := strings.Split(cmdstr, " ")
args, _ := splitInput(cmdstr)
for a.aliases[args[0]] != "" {
alias := a.aliases[args[0]]
alias = arg.ReplaceAllStringFunc(alias, func(a string) string {