mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Explanation of -t.
This commit is contained in:
parent
f9a1270d39
commit
ff21dbd58b
2
TODO
2
TODO
@ -72,8 +72,6 @@
|
|||||||
- man page:
|
- man page:
|
||||||
set-window-option
|
set-window-option
|
||||||
show-window-options
|
show-window-options
|
||||||
explanation of -t format
|
|
||||||
config file
|
|
||||||
|
|
||||||
-- For 0.4 --------------------------------------------------------------------
|
-- For 0.4 --------------------------------------------------------------------
|
||||||
- test and fix wsvt25
|
- test and fix wsvt25
|
||||||
|
18
cmd.c
18
cmd.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: cmd.c,v 1.47 2008-06-16 07:01:41 nicm Exp $ */
|
/* $Id: cmd.c,v 1.48 2008-06-16 22:03:27 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -281,8 +281,12 @@ cmd_find_client(struct cmd_ctx *ctx, const char *arg)
|
|||||||
|
|
||||||
if ((c = arg_parse_client(arg)) == NULL)
|
if ((c = arg_parse_client(arg)) == NULL)
|
||||||
c = ctx->curclient;
|
c = ctx->curclient;
|
||||||
if (c == NULL)
|
if (c == NULL) {
|
||||||
ctx->error(ctx, "client not found: %s", arg);
|
if (arg != NULL)
|
||||||
|
ctx->error(ctx, "client not found: %s", arg);
|
||||||
|
else
|
||||||
|
ctx->error(ctx, "no client found");
|
||||||
|
}
|
||||||
return (c);
|
return (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,8 +299,12 @@ cmd_find_session(struct cmd_ctx *ctx, const char *arg)
|
|||||||
s = ctx->cursession;
|
s = ctx->cursession;
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
s = cmd_current_session(ctx);
|
s = cmd_current_session(ctx);
|
||||||
if (s == NULL)
|
if (s == NULL) {
|
||||||
ctx->error(ctx, "session not found: %s", arg);
|
if (arg != NULL)
|
||||||
|
ctx->error(ctx, "session not found: %s", arg);
|
||||||
|
else
|
||||||
|
ctx->error(ctx, "no session found");
|
||||||
|
}
|
||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
74
tmux.1
74
tmux.1
@ -1,4 +1,4 @@
|
|||||||
.\" $Id: tmux.1,v 1.35 2008-06-16 17:35:40 nicm Exp $
|
.\" $Id: tmux.1,v 1.36 2008-06-16 22:03:27 nicm Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
.\"
|
.\"
|
||||||
@ -250,24 +250,68 @@ by default.
|
|||||||
.Sh COMMANDS
|
.Sh COMMANDS
|
||||||
This section contains a list of the commands supported by
|
This section contains a list of the commands supported by
|
||||||
.Nm .
|
.Nm .
|
||||||
There are some flags shared by several commands; these are:
|
Most commands accept the optional
|
||||||
.Bl -tag -width "XXXXXXXXXXXX"
|
.Fl t
|
||||||
.It Fl c Ar client-tty
|
argument with one of
|
||||||
Apply command to the client on the given tty.
|
.Ar target-client ,
|
||||||
|
.Ar target-session
|
||||||
|
or
|
||||||
|
.Ar target-window .
|
||||||
|
These specify the client, session or window which a command should affect.
|
||||||
|
.Ar target-client
|
||||||
|
is the name of the
|
||||||
|
.Xr pty 4
|
||||||
|
file to which the client is connected, for example
|
||||||
|
.Pa /dev/ttyp1 .
|
||||||
Clients may be listed with the
|
Clients may be listed with the
|
||||||
.Ic list-clients
|
.Ic list-clients
|
||||||
command.
|
command.
|
||||||
.It Fl s Ar session-name
|
.Pp
|
||||||
Apply command to the session named
|
.Ar target-session
|
||||||
.Ar session-name .
|
is either the name of a session (as listed by the
|
||||||
If it is omitted and
|
.Ic list-sessions
|
||||||
|
command); or the name of a client as for
|
||||||
|
.Ar target-client ,
|
||||||
|
in this case, the session attached to the client is used.
|
||||||
|
An
|
||||||
|
.Xr fnmatch 3
|
||||||
|
pattern may be used to match the session name.
|
||||||
|
If a session is omitted when required,
|
||||||
|
.Nm tmux
|
||||||
|
attempts to use the current session; if no current session is available, the
|
||||||
|
most recently created is chosen.
|
||||||
|
If no client is specified, the current client is chosen, if possible, or an
|
||||||
|
error is reported.
|
||||||
|
.Pp
|
||||||
|
.Ar target-window
|
||||||
|
specifies a window in the form
|
||||||
|
.Em session Ns \&: Ns Em index ,
|
||||||
|
for example mysession:1.
|
||||||
|
The session is in the same form as for
|
||||||
|
.Ar target-session .
|
||||||
|
.Em session ,
|
||||||
|
.Em index
|
||||||
|
or both may be omitted. If
|
||||||
|
.Em session
|
||||||
|
is omitted, the same rules as for
|
||||||
|
.Ar target-session
|
||||||
|
are followed; if
|
||||||
|
.Em index
|
||||||
|
is not present, the current window for the given session is used.
|
||||||
|
When the argument does not contain a colon (:),
|
||||||
.Nm
|
.Nm
|
||||||
is invoked from a running
|
first attempts to parse it as window index; if that fails, an attempt is made
|
||||||
.Nm
|
to match a session or client name.
|
||||||
client, the session containing the client is connected to will be used;
|
.Pp
|
||||||
otherwise, if only one session exists, it is chosen, or if multiple sessions
|
Examples include:
|
||||||
exist, an error is generated.
|
.Pp
|
||||||
.El
|
.Bd -literal -offset indent
|
||||||
|
refresh-client -t/dev/ttyp2
|
||||||
|
|
||||||
|
rename-session -tfirst newname
|
||||||
|
|
||||||
|
set-window-option -t:0 monitor-activity on
|
||||||
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The following commands are available:
|
The following commands are available:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
|
Loading…
Reference in New Issue
Block a user