updated for version 7.4.423
Problem: expand("$shell") does not work as documented.
Solution: Do not escape the $ when expanding environment variables.
diff --git a/src/os_unix.c b/src/os_unix.c
index 124c269..b49afc3 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5939,10 +5939,12 @@
*p++ = '\\';
++j;
}
- else if (!intick && vim_strchr(SHELL_SPECIAL,
- pat[i][j]) != NULL)
+ else if (!intick
+ && ((flags & EW_KEEPDOLLAR) == 0 || pat[i][j] != '$')
+ && vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL)
/* Put a backslash before a special character, but not
- * when inside ``. */
+ * when inside ``. And not for $var when EW_KEEPDOLLAR is
+ * set. */
*p++ = '\\';
/* Copy one character. */