From 40fddfbdd64b7be8a32c8cb2d93d1ed80b1d81bb Mon Sep 17 00:00:00 2001 From: jmc Date: Tue, 10 Jan 2017 07:55:48 +0000 Subject: avoid unneccessary markup; tweaked and ok nicm --- tmux.1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmux.1 b/tmux.1 index 8f1a251f..0679e143 100644 --- a/tmux.1 +++ b/tmux.1 @@ -940,8 +940,7 @@ lines. The argument to .Em %if is expanded as a format and if it evaluates to false -.Ns ( Ql 0 -or empty), subsequent lines are ignored until +(zero or empty), subsequent lines are ignored until .Em %endif . For example: .Bd -literal -offset indent -- cgit From e78142232fad8099912655a1910ab925c6f4a5aa Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 10 Jan 2017 10:08:59 +0000 Subject: Some manpage fixes: rephrase a convoluted sentence, make the names of some keys more standard, and use Ql instead of Dq. --- tmux.1 | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tmux.1 b/tmux.1 index 0679e143..aac3ca43 100644 --- a/tmux.1 +++ b/tmux.1 @@ -176,14 +176,16 @@ is specified, the default socket directory is not used and any .Fl L flag is ignored. .It Fl u +When starting, .Nm -attempts to guess if the terminal is likely to support UTF-8 by checking the -first of the +looks for the .Ev LC_ALL , .Ev LC_CTYPE and .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 .Fl u flag explicitly informs @@ -1183,11 +1185,11 @@ flag) or vertically. Panes may be resized with the .Ic resize-pane command (bound to -.Ql C-up , -.Ql C-down -.Ql C-left +.Ql C-Up , +.Ql C-Down +.Ql C-Left and -.Ql C-right +.Ql C-Right by default), the current pane may be changed with the .Ic select-pane command and the @@ -1724,12 +1726,14 @@ option to change this behaviour. The .Ev TERM environment variable must be set to -.Dq screen +.Ql screen +or +.Ql tmux for all programs running .Em inside .Nm . 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 start-up files. .Pp @@ -2222,8 +2226,8 @@ Each argument is the name of the key (such as .Ql C-a or -.Ql npage -) to send; if the string is not recognised as a key, it is sent as a series of +.Ql NPage ) +to send; if the string is not recognised as a key, it is sent as a series of characters. The .Fl l -- cgit From 5ea7a00ebac6d6d6423667a3637bc575515b3be0 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 10 Jan 2017 11:58:30 +0000 Subject: Quote backslash as well for %%%. --- cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index 9791bee7..9dfff885 100644 --- a/cmd.c +++ b/cmd.c @@ -663,7 +663,7 @@ char * cmd_template_replace(const char *template, const char *s, int idx) { char ch, *buf; - const char *ptr, *cp; + const char *ptr, *cp, quote[] = "\"\\$"; int replaced, quoted; size_t len; @@ -692,7 +692,7 @@ cmd_template_replace(const char *template, const char *s, int idx) buf = xrealloc(buf, len + (strlen(s) * 2) + 1); for (cp = s; *cp != '\0'; cp++) { - if (quoted && (*cp == '"' || *cp == '$')) + if (quoted && strchr(quote, *cp) != NULL) buf[len++] = '\\'; buf[len++] = *cp; } -- cgit