#
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 ...
|
#
95e33999 |
| 29-Aug-2015 |
nicm <nicm@openbsd.org> |
paste_send_pane can be merged into cmd-paste-buffer.c now.
|
#
909ecc87 |
| 29-Aug-2015 |
nicm <nicm@openbsd.org> |
Move struct paste_buffer out of tmux.h.
|
#
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 ...
|
#
64cf113c |
| 08-Oct-2014 |
nicm <nicm@openbsd.org> |
Add xreallocarray and remove nmemb argument from xrealloc.
|
#
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.
|
#
97bb737e |
| 16-Apr-2014 |
nicm <nicm@openbsd.org> |
Memory leak in error path and unnecessary assignment, from clang.
|
#
62e6efda |
| 07-Apr-2014 |
nicm <nicm@openbsd.org> |
save-buffer needs to use O_TRUNC.
|
#
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 ...
|
#
ede30b4f |
| 24-Mar-2013 |
nicm <nicm@openbsd.org> |
Merge show-buffer into save-buffer.
|
#
3f1c2708 |
| 22-Mar-2013 |
nicm <nicm@openbsd.org> |
Fix so capture-pane/save-buffer can work in control clients, from George Nachman.
|
#
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 ...
|
#
c36b60f4 |
| 21-Mar-2012 |
nicm <nicm@openbsd.org> |
Fix save-buffer usage, from Kazuhiko Sakaguchi.
|
#
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.
|
#
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 ...
|
#
eca05f1f |
| 30-Dec-2010 |
nicm <nicm@openbsd.org> |
Change from a per-session stack of buffers to one global stack which is much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server opti
Change from a per-session stack of buffers to one global stack which is much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option.
By Tiago Cunha.
show more ...
|
#
636a2c4a |
| 24-Jul-2010 |
nicm <nicm@openbsd.org> |
When changing so that the client passes its stdout and stderr as well as stdin up to the server, I forgot one essential point - the tmux server could now be both the producer and consumer. This happe
When changing so that the client passes its stdout and stderr as well as stdin up to the server, I forgot one essential point - the tmux server could now be both the producer and consumer. This happens when tmux is run inside tmux, as well as when piping tmux commands together.
So, using stdio(3) was a bad idea - if sufficient data was written, this could block in write(2). When that happened and the server was both producer and consumer, it deadlocks.
Change to use libevent bufferevents for the client stdin, stdout and stderr instead. This is trivial enough for output but requires a callback mechanism to trigger when stdin is finished.
This relies on the underlying polling mechanism for libevent to work with whatever devices to which the user could redirect stdin, stdout or stderr, hence the change to use poll(2) over kqueue(2) for tmux.
show more ...
|
#
7b013918 |
| 28-Jun-2010 |
nicm <nicm@openbsd.org> |
Send all three of stdin, stdout, stderr from the client to the server, so that commands can directly make use of them. This means that load-buffer and save-buffer can have "-" as the file to read fro
Send all three of stdin, stdout, stderr from the client to the server, so that commands can directly make use of them. This means that load-buffer and save-buffer can have "-" as the file to read from stdin or write to stdout.
This is a protocol version bump so the tmux server will need to be restarted after upgrade (or an older client used).
show more ...
|