Commit Graph
87 Commits
Author SHA1 Message Date
Nicholas Marriott 9c8b33ad63 Fix separator for args_print. 2026-10-06 17:41:16 +01:00
Nicholas Marriott d2d4b1bcee Merge branch 'master' into command_parser
# Conflicts:
#	cmd-parse.y
#	regress/control-client-exit.sh
#	regress/if-shell-error.sh
#	tmux.h
2026-10-06 13:16:00 +01:00
nicm f8d74ec97b Do not always perform environment variable assignments inside %else,
GitHub issue 5688 from Tushar Muralidharan.
2026-10-05 15:10:10 +00:00
nicm d9692f7ecf Add new-layouts flag for control clients so they can default to old
layouts for backwards compatibility.
2026-09-08 11:38:04 +00:00
Nicholas Marriott c624de9f3c Merge branch 'master' into command_parser
# Conflicts:
#	arguments.c
#	cmd-command-prompt.c
#	cmd-parse.y
#	cmd-run-shell.c
#	window-panes.c
2026-09-01 20:17:10 +01:00
nicm 8b3834c34f Do not leak temporary commands when expanding aliases, from Jeong, Heon. 2026-08-31 14:56:12 +00:00
Nicholas Marriott baf71480d0 Merge remote-tracking branch 'origin/master' into command_parser
# Conflicts:
#	cmd-queue.c
#	notify.c
#	options.c
2026-07-13 11:12:46 +01:00
nicm d29aa12117 Replace the notification system with events. Events can carry a payload of
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).

wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).

A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
Nicholas Marriott 80b1f20e7d Use \; at top level also. 2026-07-01 12:32:51 +01:00
Nicholas Marriott 1853c220a4 Only print one line by default. 2026-07-01 08:22:21 +01:00
Nicholas Marriott db8f9b4c52 Fix various problems. 2026-07-01 07:07:49 +01:00
Nicholas Marriott ab3da84e34 Handle aliases. 2026-07-01 00:02:10 +01:00
Nicholas Marriott bce30eefd3 Remove unused end_line. 2026-06-30 22:38:35 +01:00
Nicholas Marriott e935342702 More cleanup. 2026-06-30 22:32:36 +01:00
Nicholas Marriott 6d56dd9e7b Move file and flags into parser. 2026-06-30 22:11:25 +01:00
Nicholas Marriott 298b35c8a9 Fail on any error. 2026-06-30 18:59:45 +01:00
Nicholas Marriott fefb926291 Better way of working out any flag. 2026-06-30 18:48:58 +01:00
Nicholas Marriott 36273fde4f Better version. 2026-06-30 18:33:36 +01:00
Nicholas Marriott db9b54f232 Handle ; better. 2026-06-30 18:30:44 +01:00
Nicholas Marriott b3bb8bbd9f Options and hooks updates. 2026-06-30 17:57:38 +01:00
Your Name eb2e26f4cd Default command tree bits. 2026-06-30 15:33:37 +01:00
Nicholas Marriott 9569c57fc3 Some key bits. 2026-06-30 15:24:20 +01:00
Nicholas Marriott b48e2ea8e9 Handle key binding. 2026-06-30 11:20:04 +01:00
Your Name f7cd6ab547 No need to escape since logging already does it. 2026-06-30 10:38:39 +01:00
Your Name b8a62979ac Log func also. 2026-06-30 09:39:34 +01:00
Your Name 45f4000017 Not so much const. 2026-06-30 09:36:26 +01:00
Your Name e6ad44c8a3 Fix some errors. 2026-06-30 08:40:10 +01:00
Your Name 22b6ad6fce Add invoke API. 2026-06-30 08:24:44 +01:00
Nicholas Marriott efe2453eac New tmux parser and test program. 2026-06-30 07:27:06 +01:00
nicm 9840d4a4a3 Add a limit on maximum length of environment variable assignment in
configuration files.
2026-04-27 12:31:11 +00:00
nicm 8899c751e5 Check for NULL value in tilde expansion before dereferencing, from
Renaud Allard in GitHub issue 4916.
2026-03-09 14:31:41 +00:00
bket 21c27fdcae Simplify argument move using TAILQ_CONCAT()
Replace the manual loop moving each argument from cmd->arguments to
last->arguments with a single TAILQ_CONCAT() call. This makes the code
clearer and more efficient, while preserving identical behavior.

OK nicm@
2025-12-11 04:17:17 +00:00
nicm 2a3ec87887 Make -v to source-file pass through to subsequent source-file commands,
GitHub issue 4216.
2025-11-18 08:42:09 +00:00
nicm 6549aaf393 yyerror should be void. 2025-07-19 19:30:37 +00:00
nicm 31e8d4676a Count line numbers correctly inside strings, reported by Pedro Navarro
in GitHub issue 4325.
2025-01-13 08:58:34 +00:00
nicm a3ede3106a Check all %if in the list when deciding whether to process an
assignment, not just the most recent.
2024-11-18 08:29:35 +00:00
nicm 4008e2ff6d Make a little effort to treate CRLF as LF in config files. GitHub issue
3720.
2024-08-04 09:42:23 +00:00
nicm ac4bb89d43 Fix command prompt not to always append argument but only if there has
actually been expansion. GitHub issue 3493.
2023-03-15 08:15:39 +00:00
nicm 2111142cf1 Fix a memory leak, from Japin Li in GitHub issue 3358. 2022-10-25 09:12:05 +00:00
nicm 5cdc1bdd32 Disable aliases inside aliases for the moment. 2021-09-10 08:52:46 +00:00
nicm 5a4b2fd68c Fix parsing of aliases again (GitHub issue 2842), also make argument
parsing a bit simpler and fix the names of some client flags.
2021-09-09 06:57:48 +00:00
nicm daec63e5e6 Replace %% in command lists (by copying them) for template arguments ,
this means they can be used with {} as well. Also make argument
processing from an existing vector preserve commands. GitHub issue 2858.
2021-08-27 17:25:55 +00:00
nicm 03b83a5a34 Key bindings steal a reference to the command instead of adding their
own, it was correct not to add a reference when parsing, but the
bind-key then needs to add one.
2021-08-23 11:48:21 +00:00
nicm 1f0c0914c7 Revert one of previous, for some reason it is being freed. 2021-08-23 11:08:26 +00:00
nicm 4a753dbefc Fix a few memory leaks. 2021-08-23 11:04:21 +00:00
nicm c0048d6d20 Insert alias in the right place, GitHub issue 2842. 2021-08-22 13:00:28 +00:00
nicm 069f5925af Preserve argument type in command and convert to string on demand. 2021-08-21 20:46:43 +00:00
nicm 326d2ef234 Pass typed arguments out of the parser into the arguments list and let
it convert them into strings.
2021-08-21 18:39:07 +00:00
nicm 5241dae87d Stop caring about empty commands, just treat as a null command. 2021-08-21 17:25:32 +00:00
nicm c286fbdcd7 Preserve command group when moving temporary list to current list being
buit.
2021-08-21 14:06:17 +00:00