Commit Graph

20 Commits (877bdb46ed91580a3a4c430bc8c550314301352a)

Author SHA1 Message Date
nicm d45c12b6c9 Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
Nicholas Marriott 3d2b7d5bce When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
Nicholas Marriott 04f54ab38f Get session of -t window rather than client's window. 2013-04-22 16:34:53 +00:00
Nicholas Marriott 20636d956d 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.
2013-03-24 09:54:10 +00:00
Nicholas Marriott 48291f0eeb Make choose-tree actually work again. 2013-03-21 16:53:12 +00:00
Nicholas Marriott 66414029a1 Run session command before window in choose-tree. 2013-03-21 16:23:07 +00:00
Nicholas Marriott 180faf73af Allow choose commands to be used outside tmux, so long as at least one
client is attached.
2013-03-21 16:09:59 +00:00
Nicholas Marriott d31315884c Fix some blank line nits. 2013-01-17 03:51:21 +00:00
Nicholas Marriott b18ff67646 Add a -u flag to choose-tree to start uncollapsed, from Raghavendra D
Prabhu.
2012-12-24 12:25:52 +00:00
Nicholas Marriott eb0ad181e9 Use ACS characters for choose-tree arrows based on diff from Romain
Francoise.
2012-09-24 12:53:55 +00:00
Nicholas Marriott 4f8a6867fa Use the right index when adding item in choose-tree, from Thomas Adam. 2012-09-03 12:24:25 +00:00
Nicholas Marriott adc9fad4ac Remove an unused variable. 2012-09-03 09:36:07 +00:00
Nicholas Marriott a679a4a708 Change format of choose-tree arrows slightly, from Romain Francoise. 2012-09-03 09:01:16 +00:00
Nicholas Marriott 73c6785538 Use a separate define for each default format template and strip clutter
from the choose-tree defaults.
2012-08-14 08:51:53 +00:00
Nicholas Marriott 8889a48f9b Fix a return type. 2012-08-11 06:46:47 +00:00
Nicholas Marriott 35a8a61254 Nuke unused variable from Thomas Adam. 2012-07-12 13:03:42 +00:00
Nicholas Marriott ede8312d59 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-11 07:10:15 +00:00
Nicholas Marriott df912e3540 xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
Nicholas Marriott 91f54b59ac Fix choose-tree usage string. 2012-07-09 07:08:03 +00:00
Nicholas Marriott f20c6fe009 Add choose-tree command to show windows and sessions in the same
list. Change choose-window and -session to use the same code. From
Thomas Adam.
2012-07-08 16:04:38 +00:00