mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 13:54:54 +02:00
Sync OpenBSD patchset 1021:
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
This commit is contained in:
@ -32,8 +32,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,
|
||||
@ -77,7 +78,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'))
|
||||
|
Reference in New Issue
Block a user