summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-12 11:33:30 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-12 11:33:30 +0000
commitd8b0cf1cc5231e19116cc3208b680a07f842bfe9 (patch)
treeef1ddd7a76427ea943296528bce82c73d5c34a1d /src/ex_docmd.c
parent293ee4d421cd55f4a3c014c1c26edf02f718cc83 (diff)
updated for version 7.0022
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 7ad5513bcd..3126c6a611 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3958,6 +3958,16 @@ expand_filename(eap, cmdlinep, errormsgp)
continue;
}
+ /* Wildcards won't be expanded below, the replacement is taken
+ * literally. But do expand "~/file", "~user/file" and "$HOME/file". */
+ if (vim_strchr(repl, '$') != NULL || vim_strchr(repl, '~') != NULL)
+ {
+ char_u *l = repl;
+
+ repl = expand_env_save(repl);
+ vim_free(l);
+ }
+
/* Need to escape white space et al. with a backslash. Don't do this
* for shell commands (may have to use quotes instead). Don't do this
* for non-unix systems when there is a single argument (spaces don't