tmux  3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
  Fossies Dox: tmux-3.2a.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cmd-find.c File Reference
#include <sys/types.h>
#include <fnmatch.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "tmux.h"
Include dependency graph for cmd-find.c:

Go to the source code of this file.

Functions

static int cmd_find_session_better (struct session *, struct session *, int)
 
static struct sessioncmd_find_best_session (struct session **, u_int, int)
 
static int cmd_find_best_session_with_window (struct cmd_find_state *)
 
static int cmd_find_best_winlink_with_window (struct cmd_find_state *)
 
static const char * cmd_find_map_table (const char *[][2], const char *)
 
static void cmd_find_log_state (const char *, struct cmd_find_state *)
 
static int cmd_find_get_session (struct cmd_find_state *, const char *)
 
static int cmd_find_get_window (struct cmd_find_state *, const char *, int)
 
static int cmd_find_get_window_with_session (struct cmd_find_state *, const char *)
 
static int cmd_find_get_pane (struct cmd_find_state *, const char *, int)
 
static int cmd_find_get_pane_with_session (struct cmd_find_state *, const char *)
 
static int cmd_find_get_pane_with_window (struct cmd_find_state *, const char *)
 
static struct window_panecmd_find_inside_pane (struct client *c)
 
static int cmd_find_client_better (struct client *c, struct client *than)
 
struct clientcmd_find_best_client (struct session *s)
 
void cmd_find_clear_state (struct cmd_find_state *fs, int flags)
 
int cmd_find_empty_state (struct cmd_find_state *fs)
 
int cmd_find_valid_state (struct cmd_find_state *fs)
 
void cmd_find_copy_state (struct cmd_find_state *dst, struct cmd_find_state *src)
 
void cmd_find_from_session (struct cmd_find_state *fs, struct session *s, int flags)
 
void cmd_find_from_winlink (struct cmd_find_state *fs, struct winlink *wl, int flags)
 
int cmd_find_from_session_window (struct cmd_find_state *fs, struct session *s, struct window *w, int flags)
 
int cmd_find_from_window (struct cmd_find_state *fs, struct window *w, int flags)
 
void cmd_find_from_winlink_pane (struct cmd_find_state *fs, struct winlink *wl, struct window_pane *wp, int flags)
 
int cmd_find_from_pane (struct cmd_find_state *fs, struct window_pane *wp, int flags)
 
int cmd_find_from_nothing (struct cmd_find_state *fs, int flags)
 
int cmd_find_from_mouse (struct cmd_find_state *fs, struct mouse_event *m, int flags)
 
int cmd_find_from_client (struct cmd_find_state *fs, struct client *c, int flags)
 
int cmd_find_target (struct cmd_find_state *fs, struct cmdq_item *item, const char *target, enum cmd_find_type type, int flags)
 
static struct clientcmd_find_current_client (struct cmdq_item *item, int quiet)
 
struct clientcmd_find_client (struct cmdq_item *item, const char *target, int quiet)
 

Variables

static const char * cmd_find_session_table [][2]
 
static const char * cmd_find_window_table [][2]
 
static const char * cmd_find_pane_table [][2]
 

Function Documentation

◆ cmd_find_best_client()

struct client* cmd_find_best_client ( struct session s)

Definition at line 113 of file cmd-find.c.

References session::attached, clients, cmd_find_client_better(), and client::session.

Referenced by cmd_find_current_client().

◆ cmd_find_best_session()

static struct session * cmd_find_best_session ( struct session **  slist,
u_int  ssize,
int  flags 
)
static

◆ cmd_find_best_session_with_window()

◆ cmd_find_best_winlink_with_window()

◆ cmd_find_clear_state()

◆ cmd_find_client()

struct client* cmd_find_client ( struct cmdq_item item,
const char *  target,
int  quiet 
)

◆ cmd_find_client_better()

static int cmd_find_client_better ( struct client c,
struct client than 
)
static

Definition at line 104 of file cmd-find.c.

References client::activity_time, and timercmp.

Referenced by cmd_find_best_client().

◆ cmd_find_copy_state()

◆ cmd_find_current_client()

◆ cmd_find_empty_state()

int cmd_find_empty_state ( struct cmd_find_state fs)

Definition at line 655 of file cmd-find.c.

References cmd_find_state::s, cmd_find_state::w, cmd_find_state::wl, and cmd_find_state::wp.

Referenced by notify_callback().

◆ cmd_find_from_client()

◆ cmd_find_from_mouse()

◆ cmd_find_from_nothing()

◆ cmd_find_from_pane()

int cmd_find_from_pane ( struct cmd_find_state fs,
struct window_pane wp,
int  flags 
)

◆ cmd_find_from_session()

void cmd_find_from_session ( struct cmd_find_state fs,
struct session s,
int  flags 
)

◆ cmd_find_from_session_window()

int cmd_find_from_session_window ( struct cmd_find_state fs,
struct session s,
struct window w,
int  flags 
)

◆ cmd_find_from_window()

◆ cmd_find_from_winlink()

void cmd_find_from_winlink ( struct cmd_find_state fs,
struct winlink wl,
int  flags 
)

◆ cmd_find_from_winlink_pane()

void cmd_find_from_winlink_pane ( struct cmd_find_state fs,
struct winlink wl,
struct window_pane wp,
int  flags 
)

◆ cmd_find_get_pane()

◆ cmd_find_get_pane_with_session()

◆ cmd_find_get_pane_with_window()

◆ cmd_find_get_session()

static int cmd_find_get_session ( struct cmd_find_state fs,
const char *  session 
)
static

◆ cmd_find_get_window()

◆ cmd_find_get_window_with_session()

◆ cmd_find_inside_pane()

◆ cmd_find_log_state()

◆ cmd_find_map_table()

static const char * cmd_find_map_table ( const char *  table[][2],
const char *  s 
)
static

Definition at line 235 of file cmd-find.c.

Referenced by cmd_find_target().

◆ cmd_find_session_better()

static int cmd_find_session_better ( struct session s,
struct session than,
int  flags 
)
static

◆ cmd_find_target()

◆ cmd_find_valid_state()

Variable Documentation

◆ cmd_find_pane_table

const char* cmd_find_pane_table[][2]
static
Initial value:
= {
{ "{last}", "!" },
{ "{next}", "+" },
{ "{previous}", "-" },
{ "{top}", "top" },
{ "{bottom}", "bottom" },
{ "{left}", "left" },
{ "{right}", "right" },
{ "{top-left}", "top-left" },
{ "{top-right}", "top-right" },
{ "{bottom-left}", "bottom-left" },
{ "{bottom-right}", "bottom-right" },
{ "{up-of}", "{up-of}" },
{ "{down-of}", "{down-of}" },
{ "{left-of}", "{left-of}" },
{ "{right-of}", "{right-of}" },
{ NULL, NULL }
}

Definition at line 59 of file cmd-find.c.

Referenced by cmd_find_target().

◆ cmd_find_session_table

const char* cmd_find_session_table[][2]
static
Initial value:
= {
{ NULL, NULL }
}

Definition at line 48 of file cmd-find.c.

Referenced by cmd_find_target().

◆ cmd_find_window_table

const char* cmd_find_window_table[][2]
static
Initial value:
= {
{ "{start}", "^" },
{ "{last}", "!" },
{ "{end}", "$" },
{ "{next}", "+" },
{ "{previous}", "-" },
{ NULL, NULL }
}

Definition at line 51 of file cmd-find.c.

Referenced by cmd_find_target().