From f943a5594003bc2aa721c68c542bba79154d16ff Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sun, 21 Mar 2021 02:45:27 -0400 Subject: [PATCH] fix: dont replace ~ if in quotes; replace ~ with $HOME --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 205ce03..3f3fbe1 100644 --- a/main.go +++ b/main.go @@ -77,7 +77,7 @@ func main() { quoted = !quoted // dont add back quotes //sb.WriteRune(r) - } else if r == '~' { + } else if !quoted && r == '~' { sb.WriteString(os.Getenv("HOME")) } else if !quoted && r == ' ' { cmdArgs = append(cmdArgs, sb.String())