summaryrefslogtreecommitdiffstats
path: root/cmd-server-info.c
AgeCommit message (Collapse)Author
2014-01-31Fixup BSD specific things from last mergeThomas Adam
There's entries for header files we don't use, and the cvsimport doesn't like removing files automatically, etc., and it won't have known to have done this from autoconf's POV, so define that in the correct place, hence the removal of the previously committed Makefile.
2013-08-21Remove the barely-used and unnecessary command check() function.Nicholas Marriott
2013-03-07Rename session idx to session id throughout and add $ prefix to targets to useNicholas Marriott
it, extended from a diff from George Nachman.
2013-02-23Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-02-17No more lint means no more ARGSUSED.Nicholas Marriott
2013-01-30Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile grid-utf8.c
2013-01-18Rather than having two grids for each pane, one for ASCII and one forNicholas Marriott
UTF-8, collapse the two together. Simplifies the code at the expense of more memory (which can probably be reduced again later).
2012-11-22Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD.
2012-11-22Put helper function back, will be needed in a bit.Nicholas Marriott
2012-07-11Sync OpenBSD patchset 1151:Tiago Cunha
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.
2012-07-11Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott
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.
2012-03-18Sync OpenBSD patchset 1054:Tiago Cunha
Send secondary DA to terminals with XT in terminfo when starting up and parse it to work out the xterm version.
2012-03-15Send secondary DA to terminals with XT in terminfo when starting up andNicholas Marriott
parse it to work out the xterm version.
2011-07-09Expand the Id keyword. Tiago Cunha
2011-04-25Sync OpenBSD patchset 895:Tiago Cunha
POSIX only guarantees uname() will return a non-negative value on success. ok nicm@
2011-04-19POSIX only guarantees uname() will return a non-negative value onMatthew Dempsky
success. ok nicm@
2011-02-15Sync OpenBSD patchset 855:Tiago Cunha
Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
2011-02-15Sync OpenBSD patchset 854:Tiago Cunha
Use LIST_* not SLIST_*.
2011-01-26Simplify the way jobs work and drop the persist type, so all jobs areNicholas Marriott
fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
2011-01-26Use LIST_* not SLIST_*.Nicholas Marriott
2011-01-21Sync OpenBSD patchset 839:Tiago Cunha
Log termios backspace for each client since it is used to recognise backspace input.
2011-01-13Log termios backspace for each client since it is used to recogniseNicholas Marriott
backspace input.
2011-01-07Sync OpenBSD patchset 829:Tiago Cunha
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.
2011-01-04Clean up and simplify tmux command argument parsing.Nicholas Marriott
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.
2011-01-03Sync OpenBSD patchset 822:Tiago Cunha
Another table that should be const.
2011-01-01Another table that should be const.Nicholas Marriott
2010-12-31Switch tmux to use autoconf and automake.Nicholas Marriott
Although they suck, they suck less than the alternatives.
2010-12-22Sync OpenBSD patchset 806:Tiago Cunha
Store sessions in an RB tree by name rather than a list, this is tidier and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
2010-12-21Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott
and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
2009-12-10Sync OpenBSD patchset 585:Tiago Cunha
Add "server options" which are server-wide and not bound to a session or window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
2009-12-10Add "server options" which are server-wide and not bound to a session orNicholas Marriott
window. Set and displayed with "set -s" and "show -s". Currently the only option is "quiet" (like command-line -q, allowing it to be set from .tmux.conf), but others will come along.
2009-12-04Sync OpenBSD patchset 581:Tiago Cunha
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...
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-11-28Sync OpenBSD patchset 567:Tiago Cunha
Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to the rest to reduce lint output.
2009-11-26Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott
the rest to reduce lint output.
2009-11-14Sync OpenBSD patchset 539:Tiago Cunha
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.
2009-11-13Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in theNicholas Marriott
command entry structs and a couple of functions to check/set the flags.
2009-11-04Sync OpenBSD patchset 483:Tiago Cunha
Change session and client activity and creation time members to have more meaningful names. Also, remove the code to try and update the session activity time for the command client when a command message is received as is pointless because it des not have a session.
2009-11-03Change session and client activity and creation time members to have moreNicholas Marriott
meaningful names. Also, remove the code to try and update the session activity time for the command client when a command message is received as is pointless because it des not have a session.
2009-11-02Sync OpenBSD patchset 475:Tiago Cunha
Add a flag for jobs that shouldn't be freed after they've died and use it for status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
2009-11-01Add a flag for jobs that shouldn't be freed after they've died and use it forNicholas Marriott
status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
2009-10-28Sync OpenBSD patchset 467:Tiago Cunha
tabs are better; ok nicm
2009-10-26tabs are better; ok nicmTheo Deraadt
2009-10-15Fix CVS keyword.Tiago Cunha
2009-10-15Sync OpenBSD patchset 406:Tiago Cunha
Do this in a better way - print messages when exiting with nonzero. Also remove the login shell information from server-info, only the client should care about it.
2009-10-13Do this in a better way - print messages when exiting with nonzero.Nicholas Marriott
Also remove the login shell information from server-info, only the client should care about it.
2009-09-07Sync OpenBSD patchset 320:Tiago Cunha
Reference count clients and sessions rather than relying on a saved index for cmd-choose-*.
2009-09-07Reference count clients and sessions rather than relying on a saved index forNicholas Marriott
cmd-choose-*.
2009-09-03Sync OpenBSD patchset 309:Tiago Cunha
Accept -l to make it easier for people who use tmux as a login shell to use $SHELL. Originally from martynas@, tweaked by me.
2009-09-02Accept -l to make it easier for people who use tmux as a login shell to useNicholas Marriott
$SHELL. Originally from martynas@, tweaked by me.