#
ec651339 |
| 20-Apr-2015 |
nicm <nicm@openbsd.org> |
Support for multiple key tables to commands to be bound to sequences of keys. The default key bindings become the "prefix" table and -n the "root" table. Keys may be bound in new tables with bind -T
Support for multiple key tables to commands to be bound to sequences of keys. The default key bindings become the "prefix" table and -n the "root" table. Keys may be bound in new tables with bind -T and switch-client -T used to specify the table in which the next key should be looked up. Based on a diff from Keith Amling.
show more ...
|
#
f27c0343 |
| 10-Apr-2015 |
nicm <nicm@openbsd.org> |
Add a -x flag to copy-selection, append-selection and start-named-buffer to prevent it exiting copy mode after copying. From J Raynor with a few tweaks by me.
|
#
f0dcb22a |
| 20-Oct-2014 |
nicm <nicm@openbsd.org> |
Instead of setting up the default keys by building the key struct directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a
Instead of setting up the default keys by building the key struct directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q.
As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
show more ...
|
#
787b8905 |
| 14-May-2014 |
nicm <nicm@openbsd.org> |
Change key-table to mode-table to allow for some future work. From Keith Amling.
|
#
1fe07f53 |
| 10-Oct-2013 |
nicm <nicm@openbsd.org> |
Remove the barely-used and unnecessary command check() function.
|
#
175d36cc |
| 24-Mar-2013 |
nicm <nicm@openbsd.org> |
Add a command queue to standardize and simplify commands that call other commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous w
Add a command queue to standardize and simplify commands that call other commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested.
Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed.
When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty.
Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
show more ...
|
#
94d83468 |
| 22-Mar-2013 |
nicm <nicm@openbsd.org> |
Add copy-pipe mode command to copy selection and also pipe to a command.
|
#
a224d0d3 |
| 11-Jul-2012 |
nicm <nicm@openbsd.org> |
Make command exec functions return an enum rather than -1/0/1 values and add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence
Make command exec functions return an enum rather than -1/0/1 values and add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
show more ...
|
#
7d053cf9 |
| 10-Jul-2012 |
nicm <nicm@openbsd.org> |
xfree is not particularly helpful, remove it. From Thomas Adam.
|
#
574ef2a1 |
| 21-Jan-2012 |
nicm <nicm@openbsd.org> |
Use RB trees not SPLAY.
|
#
f3c64774 |
| 15-Jan-2011 |
nicm <nicm@openbsd.org> |
Fix bind-key -t.
|
#
ca7befcc |
| 04-Jan-2011 |
nicm <nicm@openbsd.org> |
Clean up and simplify tmux command argument parsing.
Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server
Clean up and simplify tmux command argument parsing.
Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept.
This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function).
This is overall more simple and consistent.
There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
show more ...
|
#
df6e8ae0 |
| 26-Jun-2010 |
nicm <nicm@openbsd.org> |
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed after the command is executing is bogus because it may still be needed if the same command is going to be executed again
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed after the command is executing is bogus because it may still be needed if the same command is going to be executed again (for example if you "bind-key a bind-key b ..."). Making a copy is hard, so instead add a reference count to the cmd_list.
While here, also print bind-key -n and the rest of the flags properly.
Fixes problem reported by mcbride@.
show more ...
|
#
dabbbec4 |
| 23-Jan-2010 |
nicm <nicm@openbsd.org> |
Don't leak if arguments appear multiple times, from Tiago Cunha.
|
#
197ec97c |
| 03-Dec-2009 |
nicm <nicm@openbsd.org> |
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
|
#
0e9de5d4 |
| 13-Nov-2009 |
nicm <nicm@openbsd.org> |
Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the command entry structs and a couple of functions to check/set the flags.
|
#
2f35b3e1 |
| 28-Jul-2009 |
nicm <nicm@openbsd.org> |
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t argument to modify a table.
|
#
454be688 |
| 26-Jul-2009 |
nicm <nicm@openbsd.org> |
Make all messages sent between the client and server fixed size.
This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly wi
Make all messages sent between the client and server fixed size.
This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data.
As a side-effect this also removes a lot of now-unused command marshalling code.
Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
show more ...
|
#
ad4696b5 |
| 24-Jul-2009 |
nicm <nicm@openbsd.org> |
Permit commands to be bound to key presses without the prefix key first. The new -n flag to bind-key and unbind-key sets or removes these bindings, and list-key shows them in []s.
|
#
0b2ec5a7 |
| 13-Jul-2009 |
nicm <nicm@openbsd.org> |
Having fixed flags for single-character getopt options is a bit hard to maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask
Having fixed flags for single-character getopt options is a bit hard to maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command.
This means new single character options can be used without the need to add it explicitly to the list.
show more ...
|
#
311827fb |
| 01-Jun-2009 |
nicm <nicm@openbsd.org> |
Import tmux, a terminal multiplexor allowing (among other things) a single terminal to be switched between several different windows and programs displayed on one terminal be detached from one termin
Import tmux, a terminal multiplexor allowing (among other things) a single terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another.
ok deraadt pirofti
show more ...
|