#
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 ...
|
#
039128ee |
| 24-Mar-2013 |
nicm <nicm@openbsd.org> |
Fix error reporting for client commands by adding a flag to cmd_find_client to tell it whether or not to show errors, sometimes it's needed and sometimes not.
|
#
e159b2e9 |
| 24-Mar-2013 |
nicm <nicm@openbsd.org> |
Add option command-prefix which is automatically prepended to any command (apart from a naked default-shell). The default is "exec ".
|
#
358e93e4 |
| 09-Dec-2012 |
nicm <nicm@openbsd.org> |
Use the CMD_*_USAGE defines consistently, from Thomas Adam.
|
#
61e1d212 |
| 14-Aug-2012 |
nicm <nicm@openbsd.org> |
Use a separate define for each default format template and strip clutter from the choose-tree defaults.
|
#
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.
|
#
cc9e5b00 |
| 22-May-2012 |
nicm <nicm@openbsd.org> |
Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam.
|
#
05babb28 |
| 17-Mar-2012 |
nicm <nicm@openbsd.org> |
Add notify hooks for various events, the functions are currently empty stubs but will be filled in for control mode later. From George Nachman.
|
#
25dd22bf |
| 04-Mar-2012 |
nicm <nicm@openbsd.org> |
free -> xfree.
|
#
bb16649b |
| 04-Mar-2012 |
nicm <nicm@openbsd.org> |
Add -F format to new-window and split-window to use with the -P flag, from George Nachman.
|
#
9c03dbf0 |
| 03-Mar-2012 |
nicm <nicm@openbsd.org> |
Add move-pane command (like join-pane but allows the same window). Also -b flag to join-pane and move-pane to place the pane to the left or above. From George Nachman.
|
#
1581b699 |
| 31-Jan-2012 |
nicm <nicm@openbsd.org> |
Provide defined ways to set the various default-path possibilities: ~ for home directory, . for server start directory, - for session start directory and empty for the pane's working directory (the d
Provide defined ways to set the various default-path possibilities: ~ for home directory, . for server start directory, - for session start directory and empty for the pane's working directory (the default). All can also be used as part of a relative path (eg -/foo). Also provide -c flags to neww and splitw to override default-path setting.
Based on a diff from sthen. ok sthen
show more ...
|
#
45f4a8f6 |
| 20-Jan-2012 |
nicm <nicm@openbsd.org> |
Add some const and fix a warning.
|
#
23f1d67d |
| 09-Dec-2011 |
nicm <nicm@openbsd.org> |
Change the way the working directory for new processes is discovered. If default-path isn't empty, it is used. Otherwise:
1) If tmux neww is run from the command line, the working directory of the
Change the way the working directory for new processes is discovered. If default-path isn't empty, it is used. Otherwise:
1) If tmux neww is run from the command line, the working directory of the client is used.
2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current working directory of the process in the active pane.
3) If that fails, the directory where the session was created is used.
Support code by Romain Francois, OpenBSD specific bits by me.
Note this requires a recent userland and kernel with KERN_PROC_CWD.
show more ...
|
#
f176699a |
| 15-Nov-2011 |
nicm <nicm@openbsd.org> |
Make window_pane_index work the same as window_index, from Ben Boeckel.
|
#
77a5bbc8 |
| 30-Aug-2011 |
nicm <nicm@openbsd.org> |
Plug memory leak, from Tiago Cunha.
|
#
76af0099 |
| 10-Feb-2011 |
nicm <nicm@openbsd.org> |
Size on split-window is -l not -s. Doh.
|
#
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 ...
|
#
2c3a3119 |
| 01-Jan-2011 |
nicm <nicm@openbsd.org> |
Add a -P option to new-window and split-window to print the new window or pane index in target form (useful to pass it into other commands).
|
#
b511d510 |
| 27-Jun-2010 |
nicm <nicm@openbsd.org> |
Store the current working directory in the session, change the default-path option to default to empty and make that mean that the stored session CWD is used.
|
#
572cd943 |
| 07-Jan-2010 |
nicm <nicm@openbsd.org> |
New command, join-pane, to split and move an existing pane into the space (like splitw then movep, or the reverse of breakp).
|
#
cfa449f5 |
| 07-Jan-2010 |
nicm <nicm@openbsd.org> |
Use the specified pane for size calculations. Doh.
|
#
1014250b |
| 07-Jan-2010 |
nicm <nicm@openbsd.org> |
Change split-window to accept a pane target (it should be split-pane but renaming the command would be annoying).
|
#
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...
|