Commit Graph

201 Commits (b6950ed8aa4487f0c1a45cbf202a97d9fa22d485)

Author SHA1 Message Date
Nicholas Marriott f429057072 Clarify default status-right, from Seth Wright. 2010-02-10 19:17:27 +00:00
Nicholas Marriott 11dedde511 Add an option to disable the smcup/rmcup alternate screen behaviour inside
tmux. From clemens fischer.
2010-02-08 00:14:38 +00:00
Nicholas Marriott 2dc74f2e4d next-layout is bound to Space not C-Space. 2010-02-07 20:33:27 +00:00
Nicholas Marriott bb53c20c18 Support attaching a client read-only with a new -r flag to the attach-session
command.
2010-02-06 22:55:31 +00:00
Nicholas Marriott 3ef3802629 Rectangle copy support, from Robin Lee Powell. 2010-02-06 17:35:01 +00:00
Nicholas Marriott 5e6a7c85cc 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-04 20:00:26 +00:00
Nicholas Marriott 604b02cfaa Option to display the active pane in a different colour with the display-panes
command. From Paul Hoffman, thanks.
2010-02-04 18:20:16 +00:00
Nicholas Marriott 6abd984608 Typo, from Micah Cowan. 2010-01-28 19:09:12 +00:00
Nicholas Marriott 3e2cc2d2c4 Alter next-word to have vi-like movement behaviour, and add next-word-end with
the existing emacs behaviour. From Micah Cowan.
2010-01-27 20:18:52 +00:00
Nicholas Marriott 1e5a94fdb5 Top/bottom of history mode keys, diff from Micah Cowan, tweaked by me. 2010-01-25 21:33:39 +00:00
Nicholas Marriott 8865eb2866 Use C-e and C-y for scrolling in vi mode, from Micah Cowan. 2010-01-23 17:49:21 +00:00
Nicholas Marriott 7d75dbbdda 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-19 21:27:47 +00:00
Nicholas Marriott f569950664 Missing Pp, from Tiago Cunha. 2010-01-18 19:16:04 +00:00
Nicholas Marriott a4ebd9af33 Document swap-pane -d. 2010-01-14 22:10:47 +00:00
Nicholas Marriott 6a45fab608 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-07 20:52:18 +00:00
Nicholas Marriott 462a11301a Change split-window to accept a pane target (it should be split-pane but
renaming the command would be annoying).
2010-01-07 19:47:10 +00:00
Nicholas Marriott 7e4f8b45b6 Options to set the colour of the pane borders, with different colours for the
active pane.
2010-01-03 12:51:05 +00:00
Nicholas Marriott 30962cb200 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-14 10:43:41 +00:00
Nicholas Marriott a4c9a80dac 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 09:16:52 +00:00
Nicholas Marriott 6311bd119e Permit panes to be referred to as "top", "bottom", "top-left" etc, if the right
pane can be identified.
2009-12-08 07:49:31 +00:00
Nicholas Marriott e755475475 Wrap at 80 columns. 2009-12-03 22:54:34 +00:00
Nicholas Marriott 15a64b805e 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-03 22:50:09 +00:00
Nicholas Marriott 6c9862662f 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-03 17:44:02 +00:00
Nicholas Marriott 0926a23014 New command, capture-pane, which copies the entire pane contents to a paste
buffer. From Jonathan Alvarado.
2009-12-01 18:42:38 +00:00
Nicholas Marriott 87821fce0e 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-24 19:16:11 +00:00
Nicholas Marriott fce47e2e63 Add cursor keys to the key names list. 2009-11-22 22:52:39 +00:00
Nicholas Marriott 543fb99bc6 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 16:22:10 +00:00
Jason McIntyre 8b8a211185 tweak previous; 2009-11-19 15:00:32 +00:00
Nicholas Marriott 4a38189349 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 14:06:33 +00:00
Nicholas Marriott ac5b7d518e Don't interpret #() for display-message, it usually doesn't make sense and may
leak commands.
2009-11-19 10:22:06 +00:00
Nicholas Marriott a78cc98c8b 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-18 17:02:17 +00:00
Nicholas Marriott 8db145da1e 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-18 13:16:33 +00:00
Nicholas Marriott 68f5c9c72d Mark -n keys with (no prefix) rather than []. 2009-11-18 10:18:25 +00:00
Nicholas Marriott 15b9946a40 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 18:53:11 +00:00
Nicholas Marriott 0785f2872f 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-03 22:40:40 +00:00
Nicholas Marriott 01943062b4 Fix vi page up mode key (from naddy), add missing half page keys, and sort. 2009-11-03 06:55:49 +00:00
Nicholas Marriott 32299e4010 Missing setenv/showenv aliases. 2009-11-01 19:17:08 +00:00
Nicholas Marriott 48b6d18e7f Remove -d from tmux.1 as well. 2009-10-25 21:12:15 +00:00
Nicholas Marriott 7b4f0398c3 [ 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 01:10:57 +00:00
Nicholas Marriott df818c1b69 -a option to kill all except current pane. From Tiago Cunha, thanks! 2009-10-24 10:12:39 +00:00
Nicholas Marriott af2b0f452c Tweak descriptions for up/down pane to be clearer. 2009-10-21 13:48:27 +00:00
Nicholas Marriott 38df960e68 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-13 13:45:56 +00:00
Nicholas Marriott 33ae063cae Permit attributes to be turned off in #[] by prefixing with "no", for example
"noblink".
2009-10-12 11:08:02 +00:00
Jason McIntyre b4ef3e5071 punctuation fix; 2009-10-11 14:12:10 +00:00
Nicholas Marriott 64b5f39656 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-11 10:04:27 +00:00
Nicholas Marriott cebc988dd4 Switch run-shell over to queue the command in the background like #(). 2009-10-11 08:58:05 +00:00
Nicholas Marriott b7c364a853 -scroll mode which is dead. 2009-10-10 17:39:55 +00:00
Nicholas Marriott 5aa49e695e Split list-panes off from list-windows. 2009-10-10 17:19:38 +00:00
Nicholas Marriott 6bca92db4d 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-10 15:03:01 +00:00
Nicholas Marriott 4658c063d5 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-10 14:51:16 +00:00
Nicholas Marriott 9dd72b9583 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-10 10:02:48 +00:00
Nicholas Marriott b7d031cc92 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-10 09:46:11 +00:00
Nicholas Marriott 3af09ac946 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 07:27:00 +00:00
Nicholas Marriott 2cb2bb8257 Support J and K for scroll up and scroll down in copy mode with vi keys,
suggested by martynas.
2009-10-07 15:58:40 +00:00
Nicholas Marriott 35ca994ba2 Remove scroll mode which is now redundant, copy mode should be used instead.
The = key binding now does nothing.
2009-10-06 07:19:32 +00:00
Nicholas Marriott 9400fdac77 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 07:09:00 +00:00
Jason McIntyre 45043ebf3e tweak previous; 2009-10-04 11:33:35 +00:00
Nicholas Marriott d42b86d22b Get / and ? the right way round in vi mode, and use : for goto line rather than
g.
2009-10-04 11:18:26 +00:00
Nicholas Marriott 205857b232 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-04 08:50:05 +00:00
Nicholas Marriott 8fa1858a2c New lock-client and lock-session commands to lock an individual client or all
clients attached to a session respectively.
2009-09-24 14:17:09 +00:00
Nicholas Marriott 9200a0be7a 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 12:03:30 +00:00
Nicholas Marriott b01dcd7971 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 06:18:47 +00:00
Nicholas Marriott 96dd3e8eb9 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 12:38:10 +00:00
Jason McIntyre b769aa59d3 zap trailing whitespace; 2009-09-21 07:45:10 +00:00
Nicholas Marriott 14ebcab5b0 run-shell command to run a shell command without opening a window, sending
stdout to output mode.
2009-09-20 19:15:01 +00:00
Nicholas Marriott 63d499f480 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-18 15:19:27 +00:00
Nicholas Marriott 372a8cb1d9 Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
2009-09-10 17:16:24 +00:00
Nicholas Marriott 3f3b01c7ce While the display-panes indicator is on screen, make the number keys select the
pane with that index.
2009-09-07 21:12:12 +00:00
Nicholas Marriott e97006b102 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 10:49:32 +00:00
Nicholas Marriott 74c35c513e 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-02 17:34:57 +00:00
Nicholas Marriott c5ac2579ba When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.
2009-09-02 16:38:35 +00:00
Nicholas Marriott 61b7dc522d Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.
2009-09-02 06:33:20 +00:00
Nicholas Marriott 7d5e494716 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-01 13:09:49 +00:00
Nicholas Marriott 04319964b9 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 20:46:19 +00:00
Stefan Sperling 8102ec3be5 squash typo
ok nicm@
2009-08-31 11:52:32 +00:00
Nicholas Marriott 7b847ced4a 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 12:18:51 +00:00
Nicholas Marriott 90400ae96a 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-23 18:21:02 +00:00
Jason McIntyre c741f2f4a6 tweak previous; 2009-08-19 16:10:26 +00:00
Nicholas Marriott 3f4418d84d 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-19 10:39:50 +00:00
Nicholas Marriott 145ba777e8 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-18 16:21:04 +00:00
Nicholas Marriott feaf91ab93 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-18 07:23:43 +00:00
Nicholas Marriott c828c2f366 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-18 07:08:26 +00:00
Nicholas Marriott 3ad4de6c8c Add a base-index session option to specify the first index checked when looking
for an index for a new window.
2009-08-13 20:11:58 +00:00
Nicholas Marriott 52793e7a3f 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-13 19:03:59 +00:00
Jason McIntyre ec0c33b844 some minor tweaks; ok nicm 2009-08-10 17:14:55 +00:00
Jason McIntyre de73fed73d zap trailing whitespace; 2009-08-09 16:03:05 +00:00
Nicholas Marriott d7de29e1e5 Minor language tweaks, change which key bindings are summarised. 2009-08-09 15:25:56 +00:00
Nicholas Marriott 57381aa560 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 14:35:15 +00:00
Nicholas Marriott 6491274f60 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 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-08 21:52:43 +00:00
Nicholas Marriott 90f8151ffd Options to set the colours and attributes for status-left/-right. From Thomas
Adam, thanks.
2009-08-08 20:36:42 +00:00
Nicholas Marriott e89e70e715 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-07 15:39:10 +00:00
Nicholas Marriott ccaf8724e4 Move introduction section up into description. From jmc. 2009-08-07 12:24:16 +00:00
Jason McIntyre 746fe5832a tweak INTRODUCTION; from nicm and myself 2009-08-06 21:06:35 +00:00
Nicholas Marriott 12ef3ceda1 Add a -a flag to set-option and set-window-option to append to an existing
string value, useful for terminal-overrides.
2009-08-04 18:45:57 +00:00
Jason McIntyre a0647f1616 restructure the layout of this page, moving the commands into various
subsections; lots of tweaks to come on the text

from nicm and myself
2009-08-04 18:41:28 +00:00
Jason McIntyre 6b69b93b53 clean up some macro abuse in the commands section; 2009-08-04 07:56:38 +00:00
Jason McIntyre 9a391b3320 tweak previous; 2009-08-03 14:34:47 +00:00
Nicholas Marriott 1673735f02 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-03 14:10:54 +00:00
Jason McIntyre 6d86882ed4 tweak previous; 2009-07-30 16:59:24 +00:00
Nicholas Marriott 071494d8fa 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 13:45:56 +00:00