Mercurial > vim
comparison src/os_unix.c @ 18514:39b0c28fe495 v8.1.2251
patch 8.1.2251: ":term command" may not work without a shell
Commit: https://github.com/vim/vim/commit/197c6b7da3ad4c3e3942a553f5dbc35722a4a349
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 3 23:37:12 2019 +0100
patch 8.1.2251: ":term command" may not work without a shell
Problem: ":term command" may not work without a shell.
Solution: Add the ++shell option to :term. (closes https://github.com/vim/vim/issues/3340)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Nov 2019 23:45:03 +0100 |
parents | 9e6d5a4abb1c |
children | e3785af3ba0f |
comparison
equal
deleted
inserted
replaced
18513:5a62159b9a48 | 18514:39b0c28fe495 |
---|---|
4297 kill(wpid, SIGINT); | 4297 kill(wpid, SIGINT); |
4298 } | 4298 } |
4299 # endif | 4299 # endif |
4300 } | 4300 } |
4301 | 4301 |
4302 #if !defined(USE_SYSTEM) || (defined(FEAT_GUI) && defined(FEAT_TERMINAL)) | 4302 #if !defined(USE_SYSTEM) || defined(FEAT_TERMINAL) || defined(PROTO) |
4303 | 4303 |
4304 static int | 4304 int |
4305 build_argv( | 4305 unix_build_argv( |
4306 char_u *cmd, | 4306 char_u *cmd, |
4307 char ***argvp, | 4307 char ***argvp, |
4308 char_u **sh_tofree, | 4308 char_u **sh_tofree, |
4309 char_u **shcf_tofree) | 4309 char_u **shcf_tofree) |
4310 { | 4310 { |
4367 buf_T *buf; | 4367 buf_T *buf; |
4368 job_T *job; | 4368 job_T *job; |
4369 aco_save_T aco; | 4369 aco_save_T aco; |
4370 oparg_T oa; /* operator arguments */ | 4370 oparg_T oa; /* operator arguments */ |
4371 | 4371 |
4372 if (build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) | 4372 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) |
4373 goto theend; | 4373 goto theend; |
4374 | 4374 |
4375 init_job_options(&opt); | 4375 init_job_options(&opt); |
4376 ch_log(NULL, "starting terminal for system command '%s'", cmd); | 4376 ch_log(NULL, "starting terminal for system command '%s'", cmd); |
4377 buf = term_start(NULL, argv, &opt, TERM_START_SYSTEM); | 4377 buf = term_start(NULL, argv, &opt, TERM_START_SYSTEM); |
4544 | 4544 |
4545 out_flush(); | 4545 out_flush(); |
4546 if (options & SHELL_COOKED) | 4546 if (options & SHELL_COOKED) |
4547 settmode(TMODE_COOK); /* set to normal mode */ | 4547 settmode(TMODE_COOK); /* set to normal mode */ |
4548 | 4548 |
4549 if (build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) | 4549 if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == FAIL) |
4550 goto error; | 4550 goto error; |
4551 | 4551 |
4552 /* | 4552 /* |
4553 * For the GUI, when writing the output into the buffer and when reading | 4553 * For the GUI, when writing the output into the buffer and when reading |
4554 * input from the buffer: Try using a pseudo-tty to get the stdin/stdout | 4554 * input from the buffer: Try using a pseudo-tty to get the stdin/stdout |