Commit Graph

7806 Commits

Author SHA1 Message Date
463bd8abb9 Merge branch 'obsd-master' 2019-05-25 18:41:51 +01:00
a65a6d62d1 Add <, >, <=, >= for formats, GitHub issue 1747. 2019-05-25 16:51:10 +00:00
207789dc2d Client name can actually be NULL, so use address in that case. 2019-05-25 10:46:55 +00:00
d7586d3d65 Use client name when logging command queue. 2019-05-25 10:44:09 +00:00
f8d3d247d8 Merge cmd_list_parse into cmd-parse.y so it can use the new alias
processing code.
2019-05-25 07:18:20 +00:00
6b0fa14470 Fix error handling in if-shell. 2019-05-25 07:15:53 +00:00
a69211aff5 Fix up regress test. 2019-05-25 08:09:23 +01:00
930245d7ff Make cmd_log_argv take a printf-like format for the prefix. 2019-05-25 06:58:10 +00:00
0dc8b7d5d8 unbreak build, okay nicm@ 2019-05-23 21:36:42 +00:00
19a3a9ee20 Merge branch 'obsd-master' 2019-05-23 21:02:30 +01:00
f3e01ecc42 Fix line numbers - commands are added after the line ends so they need to
get line - 1.
2019-05-23 18:39:00 +00:00
6c260af56d Use the same argument escaping code for options as well. 2019-05-23 18:33:53 +00:00
e817821104 Mention \. 2019-05-23 19:27:41 +01:00
f006116bac Environment variables can start with { also. 2019-05-23 18:22:13 +00:00
43431e7e84 Merge branch 'obsd-master' 2019-05-23 17:02:25 +01:00
eb8b51effc Fix drawing of status-right when it is aligned to the centre, GitHub
issue 1754.
2019-05-23 14:44:33 +00:00
389cf63cbc Tweak text. 2019-05-23 15:18:20 +01:00
2148fe33cd CHANGES: remove note to packagers 2019-05-23 15:16:10 +01:00
1a6540fea0 CHANGES: remove note to packagers 2019-05-23 15:15:42 +01:00
7d702f3cef Don't remove group items for group 0 (no group). 2019-05-23 15:15:42 +01:00
d0c462f718 Fix length calculation for pasting UTF-8 characters in the status line,
GitHub issue 1753.
2019-05-23 15:15:42 +01:00
238d2aa870 CHANGES: mention yacc 2019-05-23 15:12:24 +01:00
6bb505eb73 CHANGES: mention yacc 2019-05-23 15:11:25 +01:00
83b9807370 Remove duplicate. 2019-05-23 15:11:25 +01:00
3e6e533779 Add yacc(1) bits. 2019-05-23 15:11:25 +01:00
27bfb56ad5 Break the argument escaping code into a separate function and use it to
escape key bindings in list-keys. Also escape ~ and ; and $ properly.
2019-05-23 14:03:44 +00:00
c49f2a0365 Merge branch 'obsd-master' 2019-05-23 15:02:28 +01:00
3e3eb1dd0f Don't remove group items for group 0 (no group). 2019-05-23 13:08:43 +00:00
a4fe7e81c8 Fix length calculation for pasting UTF-8 characters in the status line,
GitHub issue 1753.
2019-05-23 12:47:52 +00:00
4ce26b0393 Remove duplicate. 2019-05-23 13:32:18 +01:00
82bf0f4d48 configure.ac: add AC_PROC_YACC 2019-05-23 13:12:03 +01:00
8590ee65e6 TRAVIS: add bison to build deps 2019-05-23 13:12:03 +01:00
d67b99c7e4 configure.ac: add AC_PROC_YACC 2019-05-23 13:09:34 +01:00
092c7bfeb8 TRAVIS: add bison to build deps 2019-05-23 13:06:47 +01:00
bf2cf33fc6 Add yacc(1) bits. 2019-05-23 13:04:41 +01:00
75aeb733f2 Merge branch 'obsd-master' 2019-05-23 13:02:27 +01:00
723010ba72 Replace the split parser code (cfg.c and cmd-string.c) with a single
parser using yacc(1). This is a major change but is clearer and simpler
and allows some edge cases to be made more consistent, as well as
tidying up how aliases are handled. It will also allow some further
improvements later.

Entirely the same parser is now used for parsing the configuration file
and for string commands. This means that constructs previously only
available in .tmux.conf, such as %if, can now be used in string commands
(for example, those given to if-shell - not commands invoked from the
shell, they are still parsed by the shell itself).

The only syntax change I am aware of is that #{} outside quotes or a
comment is now considered a format and not a comment, so #{ is now a
syntax error (notably, if it is at the start of a line).

This also adds two new sections to the man page documenting the syntax
and outlining how parsing and command execution works.

Thanks to everyone who sent me test configs (they still all parse
without errors - but this doesn't mean they still work as intended!).

Thanks to Avi Halachmi for testing and man page improvements, also to
jmc@ for reviewing the man page changes.
2019-05-23 11:13:30 +00:00
7ca2e2fe88 Add a config. 2019-05-23 11:57:04 +01:00
9d450cc6d0 Merge branch 'obsd-master' 2019-05-22 21:02:28 +01:00
5571d7a21c Fix crash if window doesn't exist, GitHub issue 1751. 2019-05-22 18:58:31 +00:00
e353d0cab3 Another config. 2019-05-22 19:49:48 +01:00
282f7fbd37 Add a test config. 2019-05-22 13:31:20 +01:00
b68fc7f104 Two more configs. 2019-05-22 07:12:38 +01:00
54dfe36340 Another. 2019-05-21 17:07:08 +01:00
c4f4904f9b More configs 2019-05-21 16:43:34 +01:00
d769fec8d6 More configs. 2019-05-21 14:41:07 +01:00
f1ce611345 Add another one. 2019-05-21 11:28:12 +01:00
3856116069 Merge branch 'obsd-master' 2019-05-21 09:02:37 +01:00
afe231c94c Add a few test configs thanks to various people. 2019-05-21 08:02:17 +01:00
ae4cccb4f1 Fix a couple of Ta from Alphonse Mariya. 2019-05-21 07:01:14 +00:00