=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/format.c,v retrieving revision 1.303 retrieving revision 1.304 diff -u -r1.303 -r1.304 --- src/usr.bin/tmux/format.c 2022/05/30 12:55:25 1.303 +++ src/usr.bin/tmux/format.c 2022/05/30 13:07:06 1.304 @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.303 2022/05/30 12:55:25 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.304 2022/05/30 13:07:06 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -801,6 +801,20 @@ return (cmd_stringify_argv(wp->argc, wp->argv)); } +/* Callback for pane_start_path. */ +static void * +format_cb_start_path(struct format_tree *ft) +{ + struct window_pane *wp = ft->wp; + + if (wp == NULL) + return (NULL); + + if (wp->cwd == NULL) + return (xstrdup("")); + return (xstrdup(wp->cwd)); +} + /* Callback for pane_current_command. */ static void * format_cb_current_command(struct format_tree *ft) @@ -2897,6 +2911,9 @@ }, { "pane_start_command", FORMAT_TABLE_STRING, format_cb_start_command + }, + { "pane_start_path", FORMAT_TABLE_STRING, + format_cb_start_path }, { "pane_synchronized", FORMAT_TABLE_STRING, format_cb_pane_synchronized