fix: add back empty string in command line split

this fixes file completion in normal usage without
using quotes. it basically cut out the space at the
end which prevented normal usage without adding an
additional space or using quotes for file
completion
cancel-commander
TorchedSammy 2022-08-30 23:38:46 -04:00
parent c13889592f
commit 1eed4cc7ee
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ func splitQuote(str string) []string {
sb.WriteRune(r)
}
}
if strings.HasSuffix(str, " ") {
split = append(split, "")
}
if sb.Len() > 0 {
split = append(split, sb.String())