From 735514e5708c68e1d183f335fb0f2870240e9a5b Mon Sep 17 00:00:00 2001 From: Kartik Singh Date: Sat, 13 Jan 2018 16:26:48 -0500 Subject: [PATCH] os/shell.c: shell_build_argv no longer splits shell --- src/nvim/os/shell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index e32c6e05d2..ebc16e852f 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -52,11 +52,11 @@ typedef struct { char **shell_build_argv(const char *cmd, const char *extra_args) FUNC_ATTR_NONNULL_RET { - size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize(p_shcf, NULL) : 0); + size_t argc = 1 + (cmd ? tokenize(p_shcf, NULL) : 0); char **rv = xmalloc((argc + 4) * sizeof(*rv)); - // Split 'shell' - size_t i = tokenize(p_sh, rv); + size_t i = 0; + rv[i++] = xstrdup((const char *) p_sh); if (extra_args) { rv[i++] = xstrdup(extra_args); // Push a copy of `extra_args`