mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Change default_window_name to use window_default_command if the actual cmd is
empty. From Josh Elsasser.
This commit is contained in:
parent
29ac832cb3
commit
08c7249636
6
names.c
6
names.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: names.c,v 1.9 2009-06-25 16:49:02 nicm Exp $ */
|
/* $Id: names.c,v 1.10 2009-07-02 18:17:46 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -78,7 +78,9 @@ default_window_name(struct window *w)
|
|||||||
{
|
{
|
||||||
if (w->active->screen != &w->active->base)
|
if (w->active->screen != &w->active->base)
|
||||||
return (xstrdup("[tmux]"));
|
return (xstrdup("[tmux]"));
|
||||||
return (parse_window_name(w->active->cmd));
|
if (w->active->cmd != NULL && *w->active->cmd != '\0')
|
||||||
|
return (parse_window_name(w->active->cmd));
|
||||||
|
return (parse_window_name(window_default_command()));
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
3
tmux.h
3
tmux.h
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tmux.h,v 1.348 2009-07-01 23:06:32 nicm Exp $ */
|
/* $Id: tmux.h,v 1.349 2009-07-02 18:17:46 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -1407,6 +1407,7 @@ int screen_check_selection(struct screen *, u_int, u_int);
|
|||||||
|
|
||||||
/* window.c */
|
/* window.c */
|
||||||
extern struct windows windows;
|
extern struct windows windows;
|
||||||
|
const char *window_default_command(void);
|
||||||
int window_cmp(struct window *, struct window *);
|
int window_cmp(struct window *, struct window *);
|
||||||
int winlink_cmp(struct winlink *, struct winlink *);
|
int winlink_cmp(struct winlink *, struct winlink *);
|
||||||
RB_PROTOTYPE(windows, window, entry, window_cmp);
|
RB_PROTOTYPE(windows, window, entry, window_cmp);
|
||||||
|
4
window.c
4
window.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: window.c,v 1.86 2009-07-01 19:42:55 nicm Exp $ */
|
/* $Id: window.c,v 1.87 2009-07-02 18:17:46 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -54,8 +54,6 @@
|
|||||||
/* Global window list. */
|
/* Global window list. */
|
||||||
struct windows windows;
|
struct windows windows;
|
||||||
|
|
||||||
const char *window_default_command(void);
|
|
||||||
|
|
||||||
RB_GENERATE(winlinks, winlink, entry, winlink_cmp);
|
RB_GENERATE(winlinks, winlink, entry, winlink_cmp);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user