diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-01-31 15:52:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-01-31 15:52:21 +0000 |
commit | 908a22e41ce9b33156ee2fa7a68bd585033cf3a3 (patch) | |
tree | 218d3848ddddab98ee5021e11dc73865e1a05743 /cmd-split-window.c | |
parent | 49a5a587ec6c99e4030d51cb65f04d49c87e3c31 (diff) | |
download | rtmux-908a22e41ce9b33156ee2fa7a68bd585033cf3a3.tar.gz rtmux-908a22e41ce9b33156ee2fa7a68bd585033cf3a3.tar.bz2 rtmux-908a22e41ce9b33156ee2fa7a68bd585033cf3a3.zip |
Provide defined ways to set the various default-path possibilities: ~
for home directory, . for server start directory, - for session start
directory and empty for the pane's working directory (the default). All
can also be used as part of a relative path (eg -/foo). Also provide -c
flags to neww and splitw to override default-path setting.
Based on a diff from sthen. ok sthen
Diffstat (limited to 'cmd-split-window.c')
-rw-r--r-- | cmd-split-window.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-split-window.c b/cmd-split-window.c index 05de0955..5aa0af5f 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -33,8 +33,9 @@ int cmd_split_window_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_split_window_entry = { "split-window", "splitw", - "dl:hp:Pt:v", 0, 1, - "[-dhvP] [-p percentage|-l size] [-t target-pane] [command]", + "c:dl:hp:Pt:v", 0, 1, + "[-dhvP] [-c start-directory] [-p percentage|-l size] [-t target-pane] " + "[command]", 0, cmd_split_window_key_binding, NULL, @@ -78,7 +79,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx) cmd = options_get_string(&s->options, "default-command"); else cmd = args->argv[0]; - cwd = cmd_get_default_path(ctx); + cwd = cmd_get_default_path(ctx, args_get(args, 'c')); type = LAYOUT_TOPBOTTOM; if (args_has(args, 'h')) |