Commit Graph

1156 Commits

Author SHA1 Message Date
7f479ffdce Merge branch 'obsd-master' into mtemp 2013-10-11 14:33:29 +01:00
d0566a474a Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
2013-10-10 12:39:24 +00:00
c1ccefc62d We accidentally haven't been using $TMUX to work out the session for a
while and in fact it is less useful that using the client ttyname. So
don't bother and don't pass it from the client. If we need it in future
it is in c->environ.
2013-10-10 12:29:35 +00:00
282c5f9644 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.
2013-10-10 12:26:34 +00:00
10c38436aa Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048. 2013-10-10 12:13:56 +00:00
6c093010e0 Remove CMD_SENDENVIRON. 2013-10-10 12:09:34 +00:00
4c9f41f1ad Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can
be NULL. Avoids crash when a command in a command client can't be
parsed.
2013-10-10 11:45:28 +00:00
e8567098a4 Add support for Cgywin, apparently it is enough just to open the tty again in
the server and fd passing is not necessary. Needs some ifdefs unfortunately but
no way around that and some of them can go next time we're willing to do a
protocol bump. Patch from J Raynor jxraynor at gmail dot com.
2013-07-12 22:21:42 +01:00
bdea2f9eda Merge branch 'obsd-master' 2013-07-06 11:18:49 +01:00
f884fff869 Implement s, S, C mode switch commands in vi(1) mode, from Ben Boeckel. 2013-07-05 14:38:23 +00:00
c7a121cfc0 Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-28 20:55:16 +01:00
828145456c Don't set TMUX_CONF in tmux.h. 2013-06-25 09:48:09 +01:00
3977dba761 Focus events can cause trouble if left on and they can't be turned off
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-23 13:10:46 +00:00
06b5805479 Merge branch 'obsd-master' 2013-06-13 18:12:49 +01:00
13441e8cb8 The actual terminfo entries we ended up with for cursor changes are Cs,
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.
2013-06-02 07:52:15 +00:00
399d7380a5 Merge branch 'obsd-master' 2013-05-31 21:44:42 +01:00
a0cf65db77 Instead of eating 1024 bytes or so for the arguments of each command,
save memory by using an RB tree. From Tiago Cunha.
2013-05-31 12:19:34 +00:00
76cb088d16 Merge branch 'obsd-master'
Conflicts:
	tmux.h
2013-05-25 11:48:12 +01:00
e323101ede Rename global configuration define. 2013-04-24 10:01:32 +00:00
ce52e45d44 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code 2013-04-24 11:00:32 +01:00
4f3c31a6b6 Use sysconfdir for the location of global tmux.conf (but default it to /etc),
based on changes from Dagobert Michelsen.
2013-04-24 10:57:03 +01:00
cd60e57b6a Merge branch 'obsd-master'
Sync from OpenBSD.
2013-04-23 08:26:04 +01:00
3d2b7d5bce When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
b58bca9a72 Merge branch 'obsd-master'
Conflicts:
	tmux.c
2013-04-13 17:05:49 +01:00
982354765b Remove tmux's (already minimal) 88 colour support. Such terminals are
few and unnecessary.
2013-03-27 11:17:12 +00:00
43fb9835fa Add -P and -F to new-session. 2013-03-25 11:44:00 +00:00
6fee3e9e4b Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.
2013-03-25 10:11:45 +00:00
410a3abbef Add a wait-for command which blocks a client on a named channel until it
is woken up again (with wait-for -S). From Thiago Padilha.
2013-03-25 10:09:05 +00:00
14fad6a5cc Add -A flag to new-session to make it behave like attach-session if the
session exists. If -A is used, -D behaves like -d to attach-session.
2013-03-24 09:58:40 +00:00
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
a60687f9ba Handle focus events from the terminal, from Aaron Jensen. 2013-03-24 09:28:59 +00:00
7f191c7951 Add -P and -F to new-session. 2013-03-22 17:01:15 +00:00
eaaeb28cda Add session_set_current helper function, extracted from a diff from
Aaron Jensen.
2013-03-22 16:00:26 +00:00
8478895eeb Add -e flag to capture-pane to include embedded ANSI SGR escape
sequences, from George Nachman.
2013-03-22 15:51:54 +00:00
db66d85176 Fix double space in sessions template. 2013-03-22 10:38:13 +00:00
f0efa576e0 Add resize-pane -x and -y for absolute pane size (much requested). 2013-03-22 10:37:39 +00:00
67b4d5b609 Support the latest theory for mouse input, this is enabled/disabled with
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.
2013-03-22 10:33:50 +00:00
10682b9e7e Instead of loads of little screen_write_*_on and off functions which
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.
2013-03-21 18:47:56 +00:00
3665be7c44 Tidy by splitting default key tables into two. 2013-03-21 16:50:22 +00:00
c982279950 Fix constness of cmd_template_replace, window_choose_add_item and
window_choose_add_window.
2013-03-21 16:19:25 +00:00
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
6ddb06d372 Extend jobs to support writing and use that for copy-pipe instead of popen,
from Chris Johnsen.
2013-03-21 14:24:33 +00:00
c5ad47ee7c Only send end guard if begin was sent, from George Nachman. 2013-03-13 07:31:36 +00:00
c41d92d27a Add time and a command count to control mode guards, based on code from George
Nachman.
2013-03-11 09:35:44 +00:00
f47a063841 Rename session idx to session id throughout and add $ prefix to targets to use
it, extended from a diff from George Nachman.
2013-03-07 10:07:22 +00:00
7fd4d49d56 Add a wait-for command which blocks a client on a named channel until it is
wokrn up again (with wait-for -S). From Thiago Padilha.
2013-03-06 09:57:26 +00:00
aaeee34c32 Preserve trailing spaces with capture-pane -J, from George Nachman. 2013-03-04 11:03:03 +00:00
f339cfd315 Add -A flag to new-session to make it behave like attach-session if the session
exists. If -A is used, -D behaves like -d to attach-session.
2013-02-24 00:43:28 +00:00
c5239c5984 Add resize-pane -Z to temporary zoom the active pane to occupy the full window
or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z
by default. The pane is unzoomed on pretty much any excuse whatsoever.

We considered making this a new layout but the requirements are quite different
from layouts so decided it is better as a special case. Each current layout
cell is saved, a temporary one-cell layout generated and all except the active
pane set to NULL.

Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and
Thiago Padilha for testing an earlier version.
2013-02-24 00:25:03 +00:00
3964309c67 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-02-23 22:25:58 +00:00