Commit Graph

382 Commits (5cc4961fd28fe920236c6716f6ff751d22d90188)

Author SHA1 Message Date
Tiago Cunha 10abdd97cf Sync OpenBSD patchset 642:
Add an option to disable the smcup/rmcup alternate screen behaviour inside
tmux. From clemens fischer.
2010-02-08 18:32:34 +00:00
Tiago Cunha c3c65c32a5 Sync OpenBSD patchset 641:
next-layout is bound to Space not C-Space.
2010-02-08 18:31:07 +00:00
Tiago Cunha c6ba781379 Sync OpenBSD patchset 639:
Support attaching a client read-only with a new -r flag to the attach-session
command.
2010-02-08 18:27:34 +00:00
Tiago Cunha 3c37b09272 Sync OpenBSD patchset 636:
Rectangle copy support, from Robin Lee Powell.
2010-02-08 18:13:17 +00:00
Tiago Cunha fa5be75396 Sync OpenBSD patchset 634:
vi-style B, W and E keys in copy mode to navigate between words treating only
spaces as word separators. Also add . to the list of word separators for
standard word navigation.

From Micah Cowan, tweaked slightly by me.
2010-02-05 01:34:08 +00:00
Tiago Cunha 82ba7e69ec Sync OpenBSD patchset 632:
Option to display the active pane in a different colour with the display-panes
command. From Paul Hoffman, thanks.
2010-02-05 01:31:06 +00:00
Tiago Cunha 72dd70b0c0 Sync OpenBSD patchset 624:
Typo, from Micah Cowan.
2010-01-28 22:48:04 +00:00
Tiago Cunha 735cfaf09a Sync OpenBSD patchset 621:
Alter next-word to have vi-like movement behaviour, and add next-word-end with
the existing emacs behaviour. From Micah Cowan.
2010-01-28 22:45:57 +00:00
Tiago Cunha c153a43299 Sync OpenBSD patchset 617:
Top/bottom of history mode keys, diff from Micah Cowan, tweaked by me.
2010-01-28 22:41:45 +00:00
Tiago Cunha 05e5bc7882 Sync OpenBSD patchset 613:
Use C-e and C-y for scrolling in vi mode, from Micah Cowan.
2010-01-25 17:11:42 +00:00
Tiago Cunha 64c26cf8ce Sync OpenBSD patchset 611:
Permit !, + and - to be used for window targets to specify last window (!), or
next and previous window by number (+ and -).

Also tidy an if in cmd-new-window.c.
2010-01-22 17:28:34 +00:00
Tiago Cunha 04b4ce8117 Sync OpenBSD patchset 610:
Missing Pp, from Tiago Cunha.
2010-01-19 00:46:30 +00:00
Tiago Cunha f772e1d362 Sync OpenBSD patchset 609:
Document swap-pane -d.
2010-01-17 19:02:47 +00:00
Tiago Cunha da194cc435 Sync OpenBSD patchset 604:
New command, join-pane, to split and move an existing pane into the space (like
splitw then movep, or the reverse of breakp).
2010-01-08 16:31:35 +00:00
Tiago Cunha 91b7db766c Sync OpenBSD patchset 600:
Change split-window to accept a pane target (it should be split-pane but
renaming the command would be annoying).
2010-01-08 16:23:38 +00:00
Tiago Cunha 106011aa53 Sync OpenBSD patchset 597:
Options to set the colour of the pane borders, with different colours for the
active pane.
2010-01-05 23:52:37 +00:00
Tiago Cunha 90d40e27da Sync OpenBSD patchset 587:
New server option, escape-time, to set the timeout used to detect if escapes
are alone or part of a function key or meta sequence.
2009-12-16 01:09:01 +00:00
Tiago Cunha dcdd2fb094 Sync OpenBSD patchset 585:
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-10 16:59:02 +00:00
Tiago Cunha 328861e330 Sync OpenBSD patchset 584:
Permit panes to be referred to as "top", "bottom", "top-left" etc, if the right
pane can be identified.
2009-12-10 16:52:58 +00:00
Tiago Cunha 3db559cf5a Sync OpenBSD patchset 582:
Wrap at 80 columns.
2009-12-04 22:16:15 +00:00
Tiago Cunha cc094fdfe6 Sync OpenBSD patchset 581:
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-04 22:14:47 +00:00
Tiago Cunha 1caa73afb4 Sync OpenBSD patchset 580:
Eliminate duplicate code and ease the passage for server-wide options by adding
a -w flag to set-option and show-options and making setw and showw aliases to
set -w and show -w.

Note: setw and showw are still there, but now aliases for set -w and show -w.
2009-12-04 22:11:23 +00:00
Tiago Cunha 55f51c4949 Sync OpenBSD patchset 577:
New command, capture-pane, which copies the entire pane contents to a paste
buffer. From Jonathan Alvarado.
2009-12-02 15:10:44 +00:00
Tiago Cunha 5f366e6d54 Sync OpenBSD patchset 561:
Add a -p flag to display-message to print the output rather than displaying in
the status line, this allows things like "display -p '#W'" to find the current
window index.
2009-11-28 14:39:53 +00:00
Tiago Cunha a3024f3d2a Sync OpenBSD patchset 560:
Add cursor keys to the key names list.
2009-11-28 14:38:30 +00:00
Tiago Cunha f9451028c0 Sync OpenBSD patchset 553:
Two new options, window-status-format and window-status-current-format, which
allow the format of each window in the status line window list to be controlled
using similar # sequences as status-left/right.

This diff also moves part of the way towards UTF-8 support in window names but
it isn't quite there yet.
2009-11-19 22:35:10 +00:00
Tiago Cunha 1feea926ed Sync OpenBSD patchset 552:
tweak previous;
2009-11-19 22:32:12 +00:00
Tiago Cunha 8512811535 Sync OpenBSD patchset 551:
Revert to xterm-keys off by default. It was on as an experiment to see if the
option could be removed, but it affects vi, so we have to keep the option, and
a conservative default is better.
2009-11-19 22:31:27 +00:00
Tiago Cunha 563f34477a Sync OpenBSD patchset 549:
Don't interpret #() for display-message, it usually doesn't make sense and may
leak commands.
2009-11-19 22:25:52 +00:00
Tiago Cunha a0b2b8e875 Sync OpenBSD patchset 547:
Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid
data into functions in a new file, grid-utf8.c, and use sizeof intead of
UTF8_DATA.

Also nuke trailing whitespace from tmux.1, reminded by jmc.
2009-11-19 22:23:27 +00:00
Tiago Cunha acc331c787 Sync OpenBSD patchset 546:
Add a per-client log of status line messages displayed while that client
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).

This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.
2009-11-19 22:20:04 +00:00
Tiago Cunha 8777a809dc Sync OpenBSD patchset 545:
Mark -n keys with (no prefix) rather than [].
2009-11-19 22:15:58 +00:00
Tiago Cunha 60869fa4c3 Sync OpenBSD patchset 526:
There is no real standard for modifier plus function keys. Previously, tmux
output some from rxvt but in other ways did the same as xterm or other
terminals, but this is a bit inconsistent.

xterm's method is fairly sensible and we already support it (xterm-keys), so
enable it by default instead.
2009-11-10 23:34:03 +00:00
Tiago Cunha 5be38f2b3a Sync OpenBSD patchset 485:
Add an activity time for clients, like for sessions, and change session and
client lookup to pick the most recently used rather than the most recently
created - this is much more useful when used interactively and (because the
activity time is set at creation) should have no effect on source-file.

Based on a problem reported by Jan Johansson.
2009-11-04 22:46:25 +00:00
Tiago Cunha 0a4d830ee1 Sync OpenBSD patchset 481:
Fix vi page up mode key (from naddy), add missing half page keys, and sort.
2009-11-04 22:38:16 +00:00
Tiago Cunha 47f69075a0 Sync OpenBSD patchset 474:
Missing setenv/showenv aliases.
2009-11-02 21:35:40 +00:00
Tiago Cunha 181f7722b3 Sync OpenBSD patchset 447:
Remove -d from tmux.1 as well.
2009-10-28 22:49:22 +00:00
Tiago Cunha 132485a660 Sync OpenBSD patchset 444:
[ is a punctuation character and should be escaped with Ql. Although the
current groff version we have seems to handle it fine, other versions are not
so tolerant.
2009-10-25 10:42:56 +00:00
Tiago Cunha 85ae64b981 Sync OpenBSD patchset 442:
-a option to kill all except current pane. From Tiago Cunha, thanks!
2009-10-25 10:41:03 +00:00
Tiago Cunha 9731625230 Sync OpenBSD patchset 428:
Tweak descriptions for up/down pane to be clearer.
2009-10-23 17:24:57 +00:00
Tiago Cunha a505ca69d9 Sync OpenBSD patchset 407:
Add mode keys to move the cursor to the top, middle and bottom of the screen.
H/M/L in vi mode and M-R/M-r in emacs (bottom of screen not bound in emacs).
2009-10-15 01:52:47 +00:00
Tiago Cunha 8ab3a3d9aa Sync OpenBSD patchset 394:
Permit attributes to be turned off in #[] by prefixing with "no", for example
"noblink".
2009-10-15 01:31:38 +00:00
Tiago Cunha 6ea6d1b29f Sync OpenBSD patchset 389:
punctuation fix;
2009-10-12 00:38:31 +00:00
Tiago Cunha 6091b051fb Sync OpenBSD patchset 387:
Add a pipe-pane command to allow a pane to be piped to a shell command, for
example:

        pipe-pane 'cat >~/out'

No arguments stops outputing and closes the pipe; the -o flag toggles a pipe
and on and off (useful for key bindings).

Suggested by espie@.
2009-10-12 00:35:08 +00:00
Tiago Cunha 197f8b88bf Sync OpenBSD patchset 384:
Switch run-shell over to queue the command in the background like #().
2009-10-12 00:25:25 +00:00
Tiago Cunha 256a55b33b Sync OpenBSD patchset 378:
-scroll mode which is dead.
2009-10-12 00:09:48 +00:00
Tiago Cunha 0b8a7dc4a2 Sync OpenBSD patchset 377:
Split list-panes off from list-windows.
2009-10-12 00:08:12 +00:00
Tiago Cunha bc236109fd Sync OpenBSD patchset 374:
Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.

This brings several advantages:

- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
  only be run once.

run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.
2009-10-11 23:55:26 +00:00
Tiago Cunha ea1721bcb0 Sync OpenBSD patchset 373:
New option, mouse-select-pane. If on, the mouse may be used to select the
current pane.

Suggested by sthen@ and also by someone else ages ago who I have forgotten.
2009-10-11 23:46:02 +00:00
Tiago Cunha 6a1ebb11df Sync OpenBSD patchset 371:
Add "grouped sessions" which have independent name, options, current window and
so on but where the linked windows are synchronized (ie creating, killing
windows and so on are mirrored between the sessions). A grouped session may be
created by passing -t to new-session.

Had this around for a while, tested by a couple of people.
2009-10-11 23:38:16 +00:00
Tiago Cunha 91e4dc83fc Sync OpenBSD patchset 370:
Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.

This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.

Diff/idea largely from Thomas Adam, tweaked by me.
2009-10-11 23:30:28 +00:00
Tiago Cunha 9ac062acef Sync OpenBSD patchset 367:
Add a simple synchronize-panes window option: when set, all input to any pane
that is part of the window is also sent to all other panes in the same
window. Suggested by several, most recently Tomasz Pajor.
2009-10-09 13:07:04 +00:00
Tiago Cunha 1eb665832a Sync OpenBSD patchset 365:
Support J and K for scroll up and scroll down in copy mode with vi keys,
suggested by martynas.
2009-10-07 17:13:59 +00:00
Tiago Cunha f881502f84 Sync OpenBSD patchset 362:
Remove scroll mode which is now redundant, copy mode should be used instead.

The = key binding now does nothing.
2009-10-06 14:14:07 +00:00
Tiago Cunha 32291172bf Sync OpenBSD patchset 361:
Make C-Up and C-Down in copy mode scroll the screen up and down one line
without moving the cursor, like Up and Down in scroll mode (which will shortly
disappear).
2009-10-06 14:10:10 +00:00
Tiago Cunha d8c0634524 Sync OpenBSD patchset 359:
tweak previous;
2009-10-05 18:26:00 +00:00
Tiago Cunha 11e97f4eb0 Sync OpenBSD patchset 358:
Get / and ? the right way round in vi mode, and use : for goto line rather than
g.
2009-10-05 18:25:05 +00:00
Tiago Cunha 2931277608 Sync OpenBSD patchset 356:
Add a key string for space ("Space") and document the names, suggested by
guenther@. Also document how to bind " and ', suggested by miod@.
2009-10-05 18:21:58 +00:00
Tiago Cunha 88c3b9c989 Sync OpenBSD patchset 353:
New lock-client and lock-session commands to lock an individual client or all
clients attached to a session respectively.
2009-09-25 17:51:39 +00:00
Tiago Cunha 5be3fb86b9 Sync OpenBSD patchset 350:
Support -c like sh(1) to execute a command, useful when tmux is a login
shell. Suggested by halex@.

This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.
2009-09-23 15:18:56 +00:00
Tiago Cunha 1310ea2729 Sync OpenBSD patchset 347:
Remove the internal tmux locking and instead detach each client and run the
command specified by a new option "lock-command" (by default "lock -np") in
each client.

This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.

Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.

This is the third protocol version change so again it is best to stop the tmux
server before upgrading.
2009-09-23 15:00:09 +00:00
Tiago Cunha df7b68480c Sync OpenBSD patchset 343:
Permit multiple prefix keys to be defined, separated by commas, for example:

set -g prefix ^a,^b

Any key in the list acts as the prefix. The send-prefix command always sends
the first key in the list.
2009-09-22 14:22:21 +00:00
Tiago Cunha b6bc8a6828 Sync OpenBSD patchset 338:
zap trailing whitespace;
2009-09-22 13:51:24 +00:00
Tiago Cunha e3dcc5327a Sync OpenBSD patchset 335:
run-shell command to run a shell command without opening a window, sending
stdout to output mode.
2009-09-20 22:20:10 +00:00
Tiago Cunha 23d7ed3187 Sync OpenBSD patchset 331:
New option, set-titles-string, to allow the window title to be specified (as
for status-left/right) if set-titles is on. Also only update the title when the
status line is being redrawn.
2009-09-19 18:53:01 +00:00
Tiago Cunha 0ec1ce005c Sync OpenBSD patchset 322:
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
2009-09-11 14:13:52 +00:00
Tiago Cunha f0cb57d8ac Sync OpenBSD patchset 321:
While the display-panes indicator is on screen, make the number keys select the
pane with that index.
2009-09-08 00:01:11 +00:00
Tiago Cunha 5edc465802 Sync OpenBSD patchset 317:
Permit embedded colour and attributes in status-left and status-right using new
#[] special characters, for example #[fg=red,bg=blue,blink].
2009-09-07 23:37:48 +00:00
Tiago Cunha 884ebb6dab Sync OpenBSD patchset 309:
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-03 21:02:55 +00:00
Tiago Cunha f796336a12 Sync OpenBSD patchset 308:
When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.
2009-09-03 20:44:38 +00:00
Tiago Cunha 3b944fe7e8 Sync OpenBSD patchset 307:
Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.
2009-09-02 22:45:17 +00:00
Tiago Cunha a3a150faf2 Sync OpenBSD patchset 305:
When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.

The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.

Based on a diff from martynas@, changed by me to be a session option rather
than a window option.
2009-09-02 01:02:44 +00:00
Tiago Cunha ed3535db8a Sync OpenBSD patchset 302:
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 22:30:15 +00:00
Tiago Cunha 2fe369831c Sync OpenBSD patchset 301:
squash typo
2009-08-31 22:25:33 +00:00
Tiago Cunha 8fd77cbb5b Sync OpenBSD patchset 294:
Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.

The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).
2009-08-25 13:53:39 +00:00
Tiago Cunha d5bc78d98b Sync OpenBSD patchset 292:
Add some other obvious variables to update-environment (WINDOWID SSH_ASKPASS
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION) so they are updated in the session
environment on new/attach.
2009-08-24 16:35:24 +00:00
Tiago Cunha 9d33b3f72a Sync OpenBSD patchset 279:
tweak previous;
2009-08-20 11:53:27 +00:00
Tiago Cunha 1292540bb5 Sync OpenBSD patchset 276:
Extend command-prompt with a -p option which is a comma-separated list of one
or more prompts to present in order.

The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts

The default template is "%1" so the response to the first prompt is processed
as a command.

Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".

From Tiago Cunha.
2009-08-20 11:51:20 +00:00
Tiago Cunha 36475f80e9 Sync OpenBSD patchset 271:
Now that pane targets (-t) are supported, switch some commands to use them
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys,
send-prefix.
2009-08-20 11:37:46 +00:00
Tiago Cunha 2a5f08c15a Sync OpenBSD patchset 265:
Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.
2009-08-20 11:22:48 +00:00
Tiago Cunha 70fc085862 Sync OpenBSD patchset 264:
Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
emacs keys, / and ? with vi; n repeats the search again with either key
set. All searching wraps the top/bottom. Goto line is g for both emacs and vi.

The search prompts don't have full line editing, just simple append and delete
characters.

Also sort the mode keys list in tmux.1.
2009-08-20 11:20:24 +00:00
Tiago Cunha e61ee94e26 Sync OpenBSD patchset 257:
Add a base-index session option to specify the first index checked when looking
for an index for a new window.
2009-08-16 19:16:27 +00:00
Tiago Cunha f415d43c3b Sync OpenBSD patchset 254:
When creating a new session from the command-line where there is an external
terminal, copy the termios(4) special characters and use them for new windows
created in the new session. Suggested by Theo.
2009-08-16 18:59:12 +00:00
Tiago Cunha 7bcd7c2752 Sync OpenBSD patchset 238:
some minor tweaks; ok nicm
2009-08-10 21:39:15 +00:00
Tiago Cunha 3dadb349eb Sync OpenBSD patchset 237:
zap trailing whitespace;
2009-08-09 18:02:36 +00:00
Tiago Cunha e43ce15736 Sync OpenBSD patchset 236:
Minor language tweaks, change which key bindings are summarised.
2009-08-09 18:02:02 +00:00
Tiago Cunha 221ce5afb3 Sync OpenBSD patchset 234:
Move the key bindings section to near the start, mention attach/detach in the
first section, and another couple of tweaks. Based on a diff from Theo.
2009-08-09 17:55:59 +00:00
Tiago Cunha 29b1b2fb5e Sync OpenBSD patchset 231:
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-09 17:48:55 +00:00
Tiago Cunha 167a8c9edc Sync OpenBSD patchset 229:
Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.
2009-08-09 17:40:17 +00:00
Tiago Cunha 5b56ea1816 Sync OpenBSD patchset 225:
If there is an error in the configuration file, don't just exit(1) as this can
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.
2009-08-09 17:19:18 +00:00
Tiago Cunha 602aae7839 Sync OpenBSD patchset 224:
Move introduction section up into description. From jmc.
2009-08-09 16:59:35 +00:00
Tiago Cunha 5840c3e13a Sync OpenBSD patchset 222:
tweak INTRODUCTION; from nicm and myself (jmc)
2009-08-09 16:54:46 +00:00
Nicholas Marriott a5d55ba16d Sync up tmux.1 from OpenBSD. 2009-08-06 19:25:44 +00:00
Tiago Cunha 89826983eb Sync OpenBSD patchset 204:
tweak previous;
2009-07-30 21:02:35 +00:00
Tiago Cunha 1650b8552f Sync OpenBSD patchset 200:
Merge pane number into the target specification for pane commands. Instead of
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.

As a side-effect this now means that swap-pane can swap panes between
different windows.

Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.
2009-07-30 20:45:20 +00:00
Tiago Cunha ec1396c9ee Sync OpenBSD patchset 199:
new sentence, new line;
2009-07-30 20:33:29 +00:00
Tiago Cunha ec3dba01b2 Sync OpenBSD patchset 198:
Add a mode-mouse option to prevent tmux taking over the mouse in choice or
copy modes.
2009-07-30 20:32:05 +00:00
Tiago Cunha 522fc94d12 Sync OpenBSD patchset 194:
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.
2009-07-28 23:19:06 +00:00
Tiago Cunha de7483a114 Sync OpenBSD patchset 192:
Next step towards customisable mode keys: build each default table of keys
into a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the mode key bindings (new
-t argument).
2009-07-28 23:11:18 +00:00
Tiago Cunha d9dcc5ed44 Sync OpenBSD patchset 191:
If select-layout is not given an argument, reapply the last layout used in the
window, if any.
2009-07-28 23:04:29 +00:00
Tiago Cunha 46cb0de347 Sync OpenBSD patchset 187:
Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in
vi).

From Kalle Olavi Niemitalo.
2009-07-28 22:44:38 +00:00
Tiago Cunha 28cf7dc39e Sync OpenBSD patchset 175:
Permit commands to be bound to key presses without the prefix key first. The
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.
2009-07-25 08:52:04 +00:00
Tiago Cunha 744ccb7cc9 Sync OpenBSD patchset 174:
up-pane and down-pane no longer auto-repeat; update the description of
repeat-time accordingly. ok nicm@

if you prefer old behaviour;

bind -r Up up-pane
bind -r Down down-pane
2009-07-25 08:39:39 +00:00
Tiago Cunha fb0301f8b8 Sync OpenBSD patchset 164:
Tidy the target parsing code a bit and correct the behaviour so that as before
a string with no colon as a target window is first looked up as a window then
as a session, noted by Iain Morgan.

Also attempt to clarify the description of the target specification in the man
page.
2009-07-23 13:06:31 +00:00
Tiago Cunha 2572c7139b Sync OpenBSD patchset 149:
Tweak unbind-key language very slightly.
2009-07-20 17:08:48 +00:00
Tiago Cunha 9a07e8f372 Sync OpenBSD patchset 147:
Add a status-justify option to allow the window list in the status line to be
positioned at the left, centre, or right.
2009-07-20 16:01:07 +00:00
Tiago Cunha e8957009c7 Sync OpenBSD patchset 146:
New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
attributes with which the current window is shown in the status line. From
Johan Friis, thanks.
2009-07-20 15:57:05 +00:00
Tiago Cunha 95d593dd51 Sync OpenBSD patchset 143:
tweak previous;
2009-07-20 15:46:55 +00:00
Tiago Cunha 545893df73 Sync OpenBSD patchset 142:
Each window now has a tree of layout cells associated with it. In this tree,
each node is either a horizontal or vertical cell containing a list of other
cells running from left-to-right or top-to-bottom, or a leaf cell which is
associated with a pane.

The major functional changes are:

- panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and
  vertically (splitw -v, C-b ");
- panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D,
  bound to C-b left/right/up/down and C-b M-left/right/up/down);
- layouts are now applied and then may be modified by resizing or splitting
  panes, rather than being fixed and reapplied when the window is resized or
  panes are added;
- manual-vertical layout is no longer necessary, and active-only layout is gone
  (but may return in future);
- the main-pane layouts now reduce the size of the main pane to fit all panes
  if possible.

Thanks to all who tested.
2009-07-20 15:42:05 +00:00
Tiago Cunha 376c808b50 Add three new session options: visual-activity, visual-bell, visual-content.
If these are enabled (and the monitor-activity, bell-action and monitor-content
options are configurated appropriately), when activity, a bell, or content is
detected, a message is shown.

Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.
2009-07-19 14:35:56 +00:00
Tiago Cunha 17170f5d6e Add a -k flag to unlink-window which makes it behave the same as the old
kill-window - if a window is linked into only one session it unlinked and
destroyed.
2009-07-19 00:39:37 +00:00
Nicholas Marriott 19cb1fb592 Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
2009-07-18 11:07:14 +00:00
Nicholas Marriott 6bc9ee3420 Tidy up new-session and attach-session and change them to work from inside
tmux, switching the current client to the new or requested session.
2009-07-18 11:06:09 +00:00
Nicholas Marriott f1efd6b4e7 If -u is specified or UTF-8 is otherwise detected when the server is started,
enable the utf8 and status-utf8 optons. While here, note in the man page that
the server is started with the first session and exits when none remain.
2009-07-18 11:05:13 +00:00
Tiago Cunha ae7dda10ce - New command display-message (alias display) to display a message in the
status line (bound to "i" by default).
- Add support for including the window index, pane index, and window name
  in status-left, or status-right.
- Bump protocol version.
2009-07-17 18:32:54 +00:00
Nicholas Marriott 821de39b27 Fix arguments to switch-client. 2009-07-17 07:45:42 +00:00
Nicholas Marriott d358a352c0 Tidy up and improve target (-t) argument parsing:
- move the code back into cmd.c and merge with the existing functions where
  possible;
- accept "-tttyp0" as well as "-t/dev/ttyp0" for clients;
- when looking up session names, try an exact match first, and if that fails
  look for it as an fnmatch pattern and then as the start of a name - if more
  that one session matches an error is given; so if there is one session called
  "mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there
  is also "mysession2", the last two are errors;
- similarly for windows, if the argument is not a valid index or exact window
  name match, try it against the window names as an fnmatch pattern and a
  prefix.
2009-07-14 06:42:06 +00:00
Nicholas Marriott 61bd3ae1c6 Document the -k flag to new-window. 2009-07-14 06:39:44 +00:00
Nicholas Marriott 5ef5bd7c31 Add a "back to indentation" key in copy mode to move the cursor to the first
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another
from Kalle Olavi Niemitalo, thanks.
2009-07-14 06:39:25 +00:00
Nicholas Marriott d2c3dbc665 If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.
2009-07-14 06:38:14 +00:00
Nicholas Marriott 30f47dfc5e Add -r to the synopsis of the paste-buffer command, prompted by jmc. 2009-07-12 17:12:06 +00:00
Nicholas Marriott 27fc963631 When pasting, translate \n into \r. This matches xterm and putty's behaviour,
and makes emacs happy when pasting into some modes. A new -r (raw) flag to
paste-buffer pastes without the translation.

From Kalle Olavi Niemitalo, thanks!
2009-07-12 17:11:39 +00:00
Nicholas Marriott ef5f356da2 paste-buffer -d was not documented. From Kalle Olavi Niemitalo. 2009-07-12 17:10:35 +00:00
Nicholas Marriott d7b4aa0ff3 Add a default-terminal option to set the starting value of $TERM in new
windows.
2009-07-12 17:07:58 +00:00
Nicholas Marriott 79bc6041c9 Document display-time option which seems to have been missed. 2009-07-12 17:04:21 +00:00
Nicholas Marriott eee3dd297e New command, if-shell (alias if). Executes the tmux command in the second
argument if the shell command in the first succeeds, for example:

       if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt"

Written by Tiago Cunha, many thanks.
2009-07-09 18:14:18 +00:00
Nicholas Marriott 2ddcb51df3 Fix $Id$. 2009-07-08 18:03:03 +00:00
Nicholas Marriott b7a272fe6d Add a section summarising how options work, make the distinction between window
and session options clearer, and fix the incorrect synopses and descriptions of
show-options and show-window-options.
2009-07-08 17:57:07 +00:00
Nicholas Marriott 9f0653386b $Id$. 2009-07-01 23:06:32 +00:00
Nicholas Marriott 22d1b9412e Using -l to specify a login shell is non-POSIX and causes problems with shells
that do not support it. Instead, set an empty default-command to invoke $SHELL
with - prefixed to argv[0], and make this the default setting.
2009-07-01 19:42:55 +00:00
Nicholas Marriott eed4f7600d Fix $Id$. 2009-06-29 22:04:51 +00:00
Nicholas Marriott 796b2e3ec9 Add missing spaces before some alias closing brackets, otherwise they are
shown in the wrong style.
2009-06-29 22:02:20 +00:00
Nicholas Marriott a5830b9603 Restore $Id$ and add script to do so. 2009-06-25 16:21:32 +00:00
Nicholas Marriott 28bcf774e5 New session option, status-utf8, to control the interpretation of top-bit-set
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).
2009-06-25 15:48:25 +00:00
Nicholas Marriott 5b3db7b56c Sync man page with OpenBSD. 2009-06-25 15:30:29 +00:00
Tiago Cunha 80af85a102 - New window option monitor-content to search for a string in a window, and
highlight the status line if it matches.
- To make this possible, the function cmd_find_window_search from
  cmd-find-window.c had to be moved to window.c and renamed window_pane_search.
- While there use three new functions in server.c to check for bell, activity,
  and content, to avoid too much nesting.
2009-05-19 13:32:55 +00:00
Nicholas Marriott c21ffbc772 left-vertical -> main-vertical.
Also update CHANGES/TODO.
2009-05-18 21:58:40 +00:00
Nicholas Marriott 143aa718e5 Space trimmage mega-diff. 2009-05-04 17:58:27 +00:00
Nicholas Marriott cdf472f2de Merge resize-pane-{up,down} into resize-pane. 2009-04-30 06:01:24 +00:00
Tiago Cunha 53dc88e276 Simplify the code by using the generic _target functions. 2009-04-28 18:29:44 +00:00
Nicholas Marriott 850965584e Missing Ar. 2009-04-27 14:50:22 +00:00
Tiago Cunha e397e3a5f8 - Add alias to the break-pane command.
- s/Asks/Ask/ in the confirm-before command for consistency's sake.
2009-04-27 14:40:45 +00:00
Tiago Cunha 058772e4e6 - confirm-before command.
- Bound "&" and "x" by default to confirm-before "kill-window" and
  confirm-before "kill-pane", respectively.
2009-04-27 13:21:16 +00:00
Nicholas Marriott fb2e65ad99 Document panes stuff. 2009-04-21 20:06:46 +00:00
Nicholas Marriott 4641cf36a3 Document set-remain-on-exit. 2009-04-21 16:38:23 +00:00
Nicholas Marriott 73e375f9eb Document break-pane. 2009-04-21 16:34:31 +00:00
Nicholas Marriott 054edf7af9 Document status-keys. 2009-04-21 16:30:53 +00:00
Nicholas Marriott f9af6f7f8c Document -L and -8, fix synopsis. 2009-04-20 19:25:58 +00:00
Nicholas Marriott 2ab713ab6b Document -r to bind key. 2009-04-20 19:11:31 +00:00
Nicholas Marriott d9f3bcdb50 Zero to turn off updates. 2009-02-10 00:09:44 +00:00
Nicholas Marriott 44cc9c4459 Typos. 2009-02-08 18:41:03 +00:00
Nicholas Marriott 7942e49aea Session name is now shown. 2009-02-08 16:11:52 +00:00
Nicholas Marriott 3c7fefd90d Document automatic-rename. 2009-02-07 08:35:26 +00:00
Nicholas Marriott bb3eb77a2a New sentence, new line. 2009-02-07 08:22:11 +00:00
Nicholas Marriott ea8a8d39d4 Document command sequences. 2009-02-07 08:20:54 +00:00
Tiago Cunha fe9320a064 Prevent weird output on OpenBSD (probably on other BSD's too?). From nicm. 2009-02-06 19:36:17 +00:00
Tiago Cunha 70dbc2f5b1 - Document find-window.
- Document suspend-client.
- Document window-status-{attr,bg,fg}.
- Options without arguments should be listed first.
- s/Copies/Copy/.
2009-02-06 18:38:30 +00:00
Tiago Cunha 4213ff8faa copy-buffer command. 2009-02-03 17:21:19 +00:00
Tiago Cunha dd4e160d71 - Document the -p and -l options in split-window.
- Update {copy,scroll}-mode with the -u option.
- While there sort options alphabetically.
2009-02-01 18:24:25 +00:00
Nicholas Marriott ef7c891aab Missing line break. 2009-02-01 18:11:40 +00:00
Tiago Cunha 2bb499c8af Support #(command) in status-left, and status-right. 2009-01-29 23:35:14 +00:00
Nicholas Marriott c6bd9e2063 Allow status, mode and message attributes to be changed by three new options: status-attr, mode-attr, message-attr. A comma-separataed list is accepted containing: bright, dim, underscore, blink, reverse, hidden, italics, for example: set -g status-attr bright,blink
From Josh Elsasser, thanks!
2009-01-27 20:22:33 +00:00
Nicholas Marriott 7c8cd81b34 Typos. 2009-01-26 18:22:55 +00:00
Tiago Cunha f62ed6aaa3 load-buffer command 2009-01-25 19:00:10 +00:00
Nicholas Marriott caa93f0e02 Whoops. Ic not It. 2009-01-20 20:03:13 +00:00
Nicholas Marriott 5f6a351df7 Start the first client with a special socketpair so it is already known to the
server rather than playing silly games to get them synchronised before doing
anything.

Change attach-session to start the server.
2009-01-19 17:16:09 +00:00
Nicholas Marriott 1237025d99 Document xterm-keys 2009-01-17 17:16:31 +00:00
Tiago Cunha 5fefd9d11f Document repeat-time. 2009-01-16 22:52:31 +00:00
Nicholas Marriott 8b0a7c056d Document choose-*. 2009-01-16 20:18:10 +00:00
Tiago Cunha e78b7c8154 Document command-prompt template string, and panes commands. From nicm and me. 2009-01-16 17:28:49 +00:00
Nicholas Marriott 5aa3098bb6 Support #S #H in status-left/right. 2009-01-15 23:42:21 +00:00
Tiago Cunha 5bd33f5f7f Document default-path, and update set/setw with the -u flag. From nicm and me. 2009-01-15 21:24:03 +00:00
Nicholas Marriott 54209774ff Document -g. 2009-01-14 18:47:19 +00:00
Nicholas Marriott bc56751692 Disable lock-after-time by default. 2009-01-14 18:41:55 +00:00
Tiago Cunha ea8d4d43ab Update by documenting the following commands/options:
- clock-mode,
- lock-server,
- server-info,
- lock-after-time,
- set-password,
- clock-mode-colour, and
- clock-mode-style.
2009-01-12 21:23:58 +00:00
Nicholas Marriott d78bc5dfc4 save-buffer command, from Tiago Cunha. 2009-01-11 23:14:57 +00:00
Nicholas Marriott a1b43faa43 Trim spaces. 2009-01-10 01:51:22 +00:00
Nicholas Marriott 45738b2a85 Tweak. 2009-01-07 23:09:51 +00:00
Nicholas Marriott 58be8b38a7 More man page updates from Tiago Cunha. 2009-01-07 23:07:42 +00:00
Nicholas Marriott 8810fc158c Updates from Tiago Cunha. 2009-01-07 18:54:18 +00:00
Nicholas Marriott 5445918b3e source-file command from Tiago Cunha. 2008-12-15 21:21:56 +00:00
Nicholas Marriott 8524062e56 Document mode keys 2008-11-17 17:41:35 +00:00
Nicholas Marriott 5ca710d9e3 Disable UTF-8 by default and add options to enable it. 2008-11-16 13:28:59 +00:00
Nicholas Marriott efe557313a Internal screen data rewrite for better 256 colour/UTF-8 support. 2008-09-25 20:08:57 +00:00
Nicholas Marriott 80a594cae3 Document zombie window stuff. 2008-06-30 18:27:14 +00:00
Nicholas Marriott 797f04b648 Document buffer stuff. 2008-06-30 05:34:06 +00:00
Nicholas Marriott cfb611e95a Document next/prev word. 2008-06-29 07:22:00 +00:00
Nicholas Marriott 1a58f958be Document some commands. 2008-06-27 17:24:16 +00:00
Nicholas Marriott 6bc6e97da5 C-u C-f from merdely. 2008-06-26 19:02:18 +00:00
Nicholas Marriott 7836298f29 Allow use of alt keys. move-window command. 2008-06-25 20:33:20 +00:00
Nicholas Marriott e180471982 Update from Will Maier. 2008-06-19 22:14:12 +00:00
Nicholas Marriott 73d1558ed0 status-lines -> status, prefix-key -> prefix 2008-06-19 22:04:02 +00:00
Nicholas Marriott 24cc3626dc Document command-prompt. Tweak TODO. 2008-06-19 21:45:46 +00:00
Nicholas Marriott 6c23e89f48 Sort options from Pierre Riteau. 2008-06-18 16:39:15 +00:00
Nicholas Marriott 9b4d7c271b Document show-window-options, some other tweaks. 2008-06-17 06:22:15 +00:00
Nicholas Marriott c9a650c5d4 Document set-window-option, update example. 2008-06-17 06:18:44 +00:00
Nicholas Marriott ff21dbd58b Explanation of -t. 2008-06-16 22:03:27 +00:00
Nicholas Marriott 55d5b83408 Informational messages on window option changes. 2008-06-16 17:35:40 +00:00
Nicholas Marriott a8e3e989dd Document show-options. 2008-06-16 06:33:50 +00:00
Nicholas Marriott 557b6b86b0 Add a couple of extra option types, and implement show-options command. 2008-06-15 08:01:54 +00:00