mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
os/shell.c: shell_build_argv no longer splits shell
This commit is contained in:
parent
417301a615
commit
735514e570
@ -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`
|
||||
|
Loading…
Reference in New Issue
Block a user