summaryrefslogtreecommitdiffstats
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-12-09 16:28:18 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-12-09 16:28:18 +0000
commitf308ba93aae9de462b1b46e68b47bd77a843eed6 (patch)
tree82ecdeedd7bf7c532a161cb0d79328ff5de85cb0 /tmux.h
parente04d13f6a6591351b1184e7801604137f6a72b1d (diff)
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 sysctl KERN_PROC_CWD is used 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. Support code by Romain Francois, OpenBSD specific bits by me. Note this requires a recent userland and kernel with KERN_PROC_CWD.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index 83b07ba7..45e41888 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1562,6 +1562,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;
@@ -2079,6 +2080,7 @@ u_int utf8_split2(u_int, u_char *);
/* procname.c */
char *get_proc_name(int, char *);
+char *get_proc_cwd(pid_t);
/* log.c */
void log_open_tty(int);