0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0902: cannot specify directory or environment for a job

Problem:    Cannot specify directory or environment for a job.
Solution:   Add the "cwd" and "env" arguments to job options. (Yasuhiro
            Matsumoto, closes #1160)
This commit is contained in:
Bram Moolenaar
2017-08-11 19:12:11 +02:00
parent 76ca1b4041
commit 05aafed54b
9 changed files with 252 additions and 43 deletions

View File

@@ -1686,7 +1686,9 @@ struct channel_S {
#define JO2_ERR_MSG 0x0002 /* "err_msg" (JO_OUT_ << 1) */
#define JO2_TERM_NAME 0x0004 /* "term_name" */
#define JO2_TERM_FINISH 0x0008 /* "term_finish" */
#define JO2_ALL 0x000F
#define JO2_ENV 0x0010 /* "env" */
#define JO2_CWD 0x0020 /* "cwd" */
#define JO2_ALL 0x003F
#define JO_MODE_ALL (JO_MODE + JO_IN_MODE + JO_OUT_MODE + JO_ERR_MODE)
#define JO_CB_ALL \
@@ -1738,6 +1740,9 @@ typedef struct
int jo_id;
char_u jo_soe_buf[NUMBUFLEN];
char_u *jo_stoponexit;
dict_T *jo_env; /* environment variables */
char_u jo_cwd_buf[NUMBUFLEN];
char_u *jo_cwd;
#ifdef FEAT_TERMINAL
/* when non-zero run the job in a terminal window of this size */