fix: dont replace ~ if in quotes; replace ~ with $HOME

pull/5/head
TorchedSammy 2021-03-21 02:45:27 -04:00
parent 7dc2d99682
commit f943a55940
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ func main() {
quoted = !quoted quoted = !quoted
// dont add back quotes // dont add back quotes
//sb.WriteRune(r) //sb.WriteRune(r)
} else if r == '~' { } else if !quoted && r == '~' {
sb.WriteString(os.Getenv("HOME")) sb.WriteString(os.Getenv("HOME"))
} else if !quoted && r == ' ' { } else if !quoted && r == ' ' {
cmdArgs = append(cmdArgs, sb.String()) cmdArgs = append(cmdArgs, sb.String())