summaryrefslogtreecommitdiffstats
path: root/cmd-string.c
AgeCommit message (Collapse)Author
2014-11-08No need for $Id$ now.Nicholas Marriott
2014-10-21Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile cmd-list-commands.c cmd-suspend-client.c job.c tmux.h xmalloc.c
2014-10-08Add xreallocarray and remove nmemb argument from xrealloc.nicm
2013-10-10Make tilde expansion in command strings work even if it isn't terminated by /.nicm
2013-10-06Make tilde expansion in command strings work even if it isn't terminated by /.Nicholas Marriott
2013-03-24Add 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-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.
2012-12-08Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD.
2012-12-06Simplify command string parsing with a helper function from Tiago Cunha.Nicholas Marriott
2012-07-11Sync OpenBSD patchset 1150:Tiago Cunha
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2011-07-09Expand the Id keyword. Tiago Cunha
2010-12-13Read ${X} environment variables in strings and $HOME from the globalNicholas Marriott
environment rather than getenv, this allows them to be updated during the configuration file.
2010-12-13Read ${X} environment variables in strings and $HOME from the globalNicholas Marriott
environment rather than getenv, this allows them to be updated during the configuration file.
2010-02-26Sync OpenBSD patchset 649:Tiago Cunha
have_arg matches buf so it is no longer necessary, spotted by Tim van der Molen.
2010-02-19have_arg matches buf so it is no longer necessary, spotted by Tim van derNicholas Marriott
Molen.
2010-02-02Sync OpenBSD patchset 628:Tiago Cunha
Remove unnecessary comparison, pointed out by Tiago Cunha.
2010-01-31Remove unnecessary comparison, pointed out by Tiago Cunha.Nicholas Marriott
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 565:Tiago Cunha
Get a u_char from the string, otherwise it isn't possible to enter \0377 as it is mistaken for EOF (doh). Also drop an unused argument.
2009-11-26Get a u_char from the string, otherwise it isn't possible to enter \0377 as itNicholas Marriott
is mistaken for EOF (doh). Also drop an unused argument.
2009-11-22Sync OpenBSD patchset 559:Tiago Cunha
Use home from struct passwd if HOME is empty as well as if it is NULL, and fix a style nit. Both from Tiago Cunha.
2009-11-21Use home from struct passwd if HOME is empty as well as if it is NULL, and fixNicholas Marriott
a style nit. Both from Tiago Cunha.
2009-11-18Sync OpenBSD patchset 541:Tiago Cunha
I made a complete horlicks of the last change, fix it so it doesn't either lead to a double free or free the item after the end of the array.
2009-11-16I made a complete horlicks of the last change, fix it so it doesn't either leadNicholas Marriott
to a double free or free the item after the end of the array.
2009-11-13Sync OpenBSD patchset 530:Tiago Cunha
Rewrite a confusing loop when freeing the arg array on exit and move the check for argv being NULL, prompted by parfait via deraadt. Also fix some definite brokenness when assigning multiple environment variables in arguments (such as "X=1 Y=2").
2009-11-11Rewrite a confusing loop when freeing the arg array on exit and move the checkNicholas Marriott
for argv being NULL, prompted by parfait via deraadt. Also fix some definite brokenness when assigning multiple environment variables in arguments (such as "X=1 Y=2").
2009-10-28Sync OpenBSD patchset 467:Tiago Cunha
tabs are better; ok nicm
2009-10-26tabs are better; ok nicmTheo Deraadt
2009-08-09Sync OpenBSD patchset 231:Tiago Cunha
Infrastructure and commands to manage the environment for processes started within tmux. There is a global environment, copied from the external environment when the server is started and each session has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
2009-08-09Sync OpenBSD patchset 211:Tiago Cunha
Add a terminal-overrides session option allowing individual terminfo(5) entries to be overridden. The 88col/256col checks are now moved into the default setting and out of the code. Also remove a couple of old workarounds for xterm and rxvt which are no longer necessary (tmux can emulate them if missing).
2009-08-08Infrastructure and commands to manage the environment for processes startedNicholas Marriott
within tmux. There is a global environment, copied from the external environment when the server is started and each sesssion has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
2009-08-03Add a terminal-overrides session option allowing individual terminfo(5) entriesNicholas Marriott
to be overridden. The 88col/256col checks are now moved into the default setting and out of the code. Also remove a couple of old workarounds for xterm and rxvt which are no longer necessary (tmux can emulate them if missing).
2009-07-14Whoops, chose the wrong one in a conflict. Revert.Nicholas Marriott
2009-07-14If it exist, load a system-wide configuration file /etc/tmux.conf before anyNicholas Marriott
user-specified one.
2009-07-13Expand leading tildes in arguments, from Tiage Cunha.Nicholas Marriott
2009-07-13Expand leading tilde on commands which expect a filename.Tiago Cunha
2009-07-09Fix two memory leaks when assigning shell variables in configurationNicholas Marriott
file/command prompt. From Tiago Cunha.
2009-07-08Fix two memory leaks when assigning shell variables in configurationNicholas Marriott
file/command prompt. From Tiago Cunha.
2009-06-25Restore $Id$ and add script to do so.Nicholas Marriott
2009-06-25strdup the input to putenv to avoid in one case passing a string that is laterNicholas Marriott
freed and in the other const strings.
2009-06-05strdup the input to putenv to avoid in one case passing a string that is laterNicholas Marriott
freed and in the other const strings. looks sane to millert, ok ray
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
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
2009-05-15putenv can be char *.Nicholas Marriott
2009-05-04Spacing.Nicholas Marriott
2009-02-16Don't leak string arguments and options.Nicholas Marriott
2009-02-08Handle "" properly.Nicholas Marriott
2009-01-18Support command sequences separated by " ; ". Also clean up command printing.Nicholas Marriott
2009-01-10Trim spaces.Nicholas Marriott