Skip to content

Commit

Permalink
Use same working directory rules for jobs as new windows rather than
Browse files Browse the repository at this point in the history
always starting in home, GitHub issue 1488.
  • Loading branch information
nicm committed Sep 27, 2018
1 parent 7d59f82 commit 228e1a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion format.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ format_job_get(struct format_tree *ft, const char *cmd)

t = time(NULL);
if (fj->job == NULL && (force || fj->last != t)) {
fj->job = job_run(expanded, NULL, NULL, format_job_update,
fj->job = job_run(expanded, NULL,
server_client_get_cwd(ft->client, NULL), format_job_update,
format_job_complete, NULL, fj, JOB_NOWAIT);
if (fj->job == NULL) {
free(fj->out);
Expand Down
1 change: 1 addition & 0 deletions job.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ job_run(const char *cmd, struct session *s, const char *cwd,

if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, out) != 0)
return (NULL);
log_debug("%s: cmd=%s, cwd=%s", __func__, cmd, cwd);

/*
* Do not set TERM during .tmux.conf, it is nice to be able to use
Expand Down

0 comments on commit 228e1a3

Please sign in to comment.