#
3447b427 |
| 13-Dec-2015 |
nicm <nicm@openbsd.org> |
Instead of every command resolving the target (-t or -s) itself, prepare the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell t
Instead of every command resolving the target (-t or -s) itself, prepare the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting.
This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements.
The old cmd_find_* functions remain for the moment but that layer will be dropped later.
Joint work with Thomas Adam.
show more ...
|
#
eb843181 |
| 14-Nov-2015 |
nicm <nicm@openbsd.org> |
Push stdout and stderr to clients more aggressively, and add an event to continue if the send fails.
|
#
62f1fdfd |
| 12-Nov-2015 |
nicm <nicm@openbsd.org> |
If we know the terminal outside tmux is not UTF-8, replace UTF-8 in error messages and whatnot with underscores the same as we do when we draw UTF-8 characters as part of the screen.
|
#
f1973d0b |
| 10-Nov-2015 |
nicm <nicm@openbsd.org> |
If realpath() fails just try the original path.
|
#
e35bfb07 |
| 10-Nov-2015 |
nicm <nicm@openbsd.org> |
Handle absolute paths properly, and don't use resolved path in realpath() fails.
|
#
3baa4a0c |
| 31-Oct-2015 |
nicm <nicm@openbsd.org> |
Because pledge(2) does not allow us to pass directory file descriptors around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to
Because pledge(2) does not allow us to pass directory file descriptors around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
show more ...
|
#
9236dde8 |
| 05-Jun-2015 |
nicm <nicm@openbsd.org> |
Change deref to the more sensible unref, and add a couple I missed before.
|
#
629b6251 |
| 05-Jun-2015 |
nicm <nicm@openbsd.org> |
Instead of putting dead clients on a list and checking it every loop, use event_once to queue a callback to deal with them. Also dead clients with references would never actually be freed because the
Instead of putting dead clients on a list and checking it every loop, use event_once to queue a callback to deal with them. Also dead clients with references would never actually be freed because the wrap-up functions (the callback for stdin, or status_prompt_clear) would never be called. So call them in server_client_lost.
show more ...
|
#
f65f2164 |
| 27-Apr-2015 |
nicm <nicm@openbsd.org> |
Rewrite of the target resolution internals to be simpler and more consistent but with much less duplication, but keeping the same internal API. Also adds more readable aliases for some of the special
Rewrite of the target resolution internals to be simpler and more consistent but with much less duplication, but keeping the same internal API. Also adds more readable aliases for some of the special tokens used in targets (eg "{start}" instead of "^"). Some behaviours may have changed, for example prefix matches now happen before fnmatch.
show more ...
|
#
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 ...
|
#
c6cf1eff |
| 01-Sep-2014 |
nicm <nicm@openbsd.org> |
Various minor style and spacing nits.
|
#
a41fa27a |
| 13-May-2014 |
nicm <nicm@openbsd.org> |
Add support for named buffers. If you don't name a buffer, things work much as before - buffers are automatically named "buffer0000", "buffer0001" and so on and ordered as a stack. Buffers can be nam
Add support for named buffers. If you don't name a buffer, things work much as before - buffers are automatically named "buffer0000", "buffer0001" and so on and ordered as a stack. Buffers can be named explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b buffer0000 -n foo"). If buffers are named explicitly, they are not deleted when buffer-limit is reached. Diff from J Raynor.
show more ...
|
#
ca678466 |
| 24-Apr-2014 |
nicm <nicm@openbsd.org> |
There is no longer a need for a paste_stack struct or for global_buffers to be global. Move to paste.c.
|
#
1ac29a77 |
| 17-Feb-2014 |
nicm <nicm@openbsd.org> |
Fix memory leaks with paste_replace, based on changes from J Raynor.
|
#
f3715830 |
| 14-Feb-2014 |
nicm <nicm@openbsd.org> |
Style nit - no space between function name and bracket.
|
#
e1803d63 |
| 10-Oct-2013 |
nicm <nicm@openbsd.org> |
Alter how tmux handles the working directory to internally use file descriptors rather than strings.
- Each session still has a current working directory.
- New sessions still get their working dir
Alter how tmux handles the working directory to internally use file descriptors rather than strings.
- Each session still has a current working directory.
- New sessions still get their working directory from the client that created them or its attached session if any.
- New windows are created by default in the session working directory.
- The -c flag to new, neww, splitw allows the working directory to be overridden.
- The -c flag to attach let's the session working directory be changed.
- The default-path option has been removed.
To get the equivalent to default-path '.', do:
bind c neww -c $PWD
To get the equivalent of default-path '~', do:
bind c neww -c ~
This also changes the client identify protocol to be a set of messages rather than one as well as some other changes that should make it easier to make backwards-compatible protocol changes in future.
show more ...
|
#
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 ...
|
#
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.
|
#
c66f8665 |
| 21-May-2012 |
nicm <nicm@openbsd.org> |
Instead of passing stdin/stdout/stderr file descriptors over imsg and handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes
Instead of passing stdin/stdout/stderr file descriptors over imsg and handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes and the performance hit isn't critical.
The tty fd is still passed to the server as before.
This bumps the tmux protocol version so new clients and old servers are incompatible.
show more ...
|
#
35a092d6 |
| 23-Oct-2011 |
nicm <nicm@openbsd.org> |
Try to resolve relative paths for loadb and saveb (first using client working directory if any then default-path or session wd).
|
#
521765b0 |
| 23-Oct-2011 |
nicm <nicm@openbsd.org> |
Plug a memory leak and update some comments, from Tiago Cunha.
|
#
a80784a1 |
| 18-May-2011 |
nicm <nicm@openbsd.org> |
Use xfree not free, from Tiago Cunha.
|
#
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 ...
|