From c1b994852594b23b7443e01e05257c991684ba4e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 9 Dec 2011 16:37:29 +0000 Subject: Change the way the working directory for new processes is discovered. If default-path isn't empty, it is used. Otherwise: 1) If tmux neww is run from the command line, the working directory of the client is used. 2) Otherwise use some platform specific code to retrieve the current working directory of the process in the active pane. 3) If that fails, the directory where the session was created is used. Idea and support code, Linux, Solaris, FreeBSD bits by Romain Francoise, OpenBSD bits by me. --- tmux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index dc168c9b..6553388b 100644 --- a/tmux.h +++ b/tmux.h @@ -1558,6 +1558,7 @@ int cmd_find_index( struct winlink *cmd_find_pane(struct cmd_ctx *, const char *, struct session **, struct window_pane **); char *cmd_template_replace(char *, const char *, int); +char *cmd_get_default_path(struct cmd_ctx *ctx); extern const struct cmd_entry *cmd_table[]; extern const struct cmd_entry cmd_attach_session_entry; extern const struct cmd_entry cmd_bind_key_entry; @@ -2075,6 +2076,7 @@ u_int utf8_split2(u_int, u_char *); /* osdep-*.c */ char *osdep_get_name(int, char *); +char *osdep_get_cwd(pid_t); struct event_base *osdep_event_init(void); /* log.c */ -- cgit