From 2feb36f6204cf02d77d63af33df09cbbbe3d65b2 Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland@redhat.com>
Date: Mon, 26 Sep 1994 22:45:08 +0000
Subject: [PATCH] (quote_as_word): Actually test DOUBLE_DOLLARS, instead of
 always doubling.

---
 main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.c b/main.c
index ac4be34d..7aae9f5f 100644
--- a/main.c
+++ b/main.c
@@ -1555,7 +1555,7 @@ quote_as_word (out, in, double_dollars)
     {
       if (index ("^;'\"*?[]$<>(){}|&~`\\ \t\r\n\f\v", *in) != 0)
 	*out++ = '\\';
-      if (*in == '$')
+      if (double_dollars && *in == '$')
 	*out++ = '$';
       *out++ = *in++;
     }