Merge branch 'master' of github.com:tmux/tmux

This commit is contained in:
Nicholas Marriott 2017-01-10 19:27:23 +00:00
commit 152bfa02f0
2 changed files with 18 additions and 15 deletions

4
cmd.c
View File

@ -662,7 +662,7 @@ char *
cmd_template_replace(const char *template, const char *s, int idx) cmd_template_replace(const char *template, const char *s, int idx)
{ {
char ch, *buf; char ch, *buf;
const char *ptr, *cp; const char *ptr, *cp, quote[] = "\"\\$";
int replaced, quoted; int replaced, quoted;
size_t len; size_t len;
@ -691,7 +691,7 @@ cmd_template_replace(const char *template, const char *s, int idx)
buf = xrealloc(buf, len + (strlen(s) * 2) + 1); buf = xrealloc(buf, len + (strlen(s) * 2) + 1);
for (cp = s; *cp != '\0'; cp++) { for (cp = s; *cp != '\0'; cp++) {
if (quoted && (*cp == '"' || *cp == '$')) if (quoted && strchr(quote, *cp) != NULL)
buf[len++] = '\\'; buf[len++] = '\\';
buf[len++] = *cp; buf[len++] = *cp;
} }

29
tmux.1
View File

@ -176,14 +176,16 @@ is specified, the default socket directory is not used and any
.Fl L .Fl L
flag is ignored. flag is ignored.
.It Fl u .It Fl u
When starting,
.Nm .Nm
attempts to guess if the terminal is likely to support UTF-8 by checking the looks for the
first of the
.Ev LC_ALL , .Ev LC_ALL ,
.Ev LC_CTYPE .Ev LC_CTYPE
and and
.Ev LANG .Ev LANG
environment variables to be set for the string "UTF-8". environment variables: if the first found contains
.Ql UTF-8 ,
then the terminal is assumed to support UTF-8.
This is not always correct: the This is not always correct: the
.Fl u .Fl u
flag explicitly informs flag explicitly informs
@ -944,8 +946,7 @@ lines.
The argument to The argument to
.Em %if .Em %if
is expanded as a format and if it evaluates to false is expanded as a format and if it evaluates to false
.Ns ( Ql 0 (zero or empty), subsequent lines are ignored until
or empty), subsequent lines are ignored until
.Em %endif . .Em %endif .
For example: For example:
.Bd -literal -offset indent .Bd -literal -offset indent
@ -1188,11 +1189,11 @@ flag) or vertically.
Panes may be resized with the Panes may be resized with the
.Ic resize-pane .Ic resize-pane
command (bound to command (bound to
.Ql C-up , .Ql C-Up ,
.Ql C-down .Ql C-Down
.Ql C-left .Ql C-Left
and and
.Ql C-right .Ql C-Right
by default), the current pane may be changed with the by default), the current pane may be changed with the
.Ic select-pane .Ic select-pane
command and the command and the
@ -1729,12 +1730,14 @@ option to change this behaviour.
The The
.Ev TERM .Ev TERM
environment variable must be set to environment variable must be set to
.Dq screen .Ql screen
or
.Ql tmux
for all programs running for all programs running
.Em inside .Em inside
.Nm . .Nm .
New windows will automatically have New windows will automatically have
.Dq TERM=screen .Ql TERM=screen
added to their environment, but care must be taken not to reset this in shell added to their environment, but care must be taken not to reset this in shell
start-up files. start-up files.
.Pp .Pp
@ -2227,8 +2230,8 @@ Each argument
is the name of the key (such as is the name of the key (such as
.Ql C-a .Ql C-a
or or
.Ql npage .Ql NPage )
) to send; if the string is not recognised as a key, it is sent as a series of to send; if the string is not recognised as a key, it is sent as a series of
characters. characters.
The The
.Fl l .Fl l