summaryrefslogtreecommitdiffstats
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2013-10-10 12:39:24 +0000
committernicm <nicm>2013-10-10 12:39:24 +0000
commitd0566a474aa43cb27c6a8fc62ff80ef32c7fe86e (patch)
treee6a704dab1efe06c40d2efe40df990665777d0cb /format.c
parent99e3cbc526cff605f32d61c0b4be77a8b2dbaa9f (diff)
Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
Diffstat (limited to 'format.c')
-rw-r--r--format.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/format.c b/format.c
index 19c4dc15..40957a59 100644
--- a/format.c
+++ b/format.c
@@ -518,7 +518,6 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
struct grid_line *gl;
unsigned long long size;
u_int i, idx;
- const char *cwd;
char *cmd;
size = 0;
@@ -551,9 +550,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_pid", "%ld", (long) wp->pid);
if (wp->cmd != NULL)
format_add(ft, "pane_start_command", "%s", wp->cmd);
- if ((cwd = get_proc_cwd(wp->fd)) != NULL)
- format_add(ft, "pane_current_path", "%s", cwd);
- if ((cmd = get_proc_name(wp->fd, wp->tty)) != NULL) {
+ if ((cmd = format_get_command(wp)) != NULL) {
format_add(ft, "pane_current_command", "%s", cmd);
free(cmd);
}