Commit Graph

74 Commits (65ac8e9f0c852cbf436243258c0c1878b20c3c87)

Author SHA1 Message Date
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
Jason McIntyre a87228b4ff new sentence, new line; 2009-07-30 13:31:22 +00:00
Nicholas Marriott a419e73f7a Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
modes.
2009-07-30 07:04:50 +00:00
Nicholas Marriott f596be9950 Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
argument to modify a table.
2009-07-28 17:05:10 +00:00
Nicholas Marriott 86785004ba 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 the mode key bindings (new
-t argument).
2009-07-28 07:03:32 +00:00
Nicholas Marriott 2da4864483 If select-layout is not given an argument, repply the last layout used in the
window, if any.
2009-07-28 06:48:44 +00:00
Nicholas Marriott ad0aad21d5 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-27 12:11:11 +00:00
Nicholas Marriott 5a1a106637 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-24 14:52:47 +00:00
Stuart Henderson ce4eb6559e 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-24 14:50:24 +00:00
Nicholas Marriott f7df0bac96 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-22 21:23:29 +00:00
Nicholas Marriott c0862dae45 Tweak unbind-key language very slightly. 2009-07-20 15:51:55 +00:00
Nicholas Marriott b292f71c49 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 14:32:09 +00:00
Nicholas Marriott e32e0d5692 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 09:15:18 +00:00
Jason McIntyre 550b855c9d tweak previous; 2009-07-19 14:07:47 +00:00
Nicholas Marriott 6036bdd06c Improved layout code.
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-19 13:21:40 +00:00
Nicholas Marriott fc6a65c620 Add three new session options: visual-activity, visual-bell, visual-content. If
these are enabled (and the monitor-activity, bell-actio 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-18 14:59:25 +00:00
Nicholas Marriott 0ca6f667e3 Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
2009-07-17 20:37:03 +00:00
Nicholas Marriott 6f5150a943 - New command display-message (alias display) to display a message in the
status line (bound to "i" and displays the current window and time by
  default). The same substitutions are applied as for status-left/right.
- Add support for including the window index (#I), pane index (#P) and window
  name (#W) in the message, and status-left or status-right.
- Bump protocol version.

From Tiago Cunha, thanks!
2009-07-17 18:45:08 +00:00
Nicholas Marriott ce53936a2b 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.

Written with Josh Elsasser.
2009-07-17 15:03:11 +00:00
Nicholas Marriott 7ddba901a4 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-17 13:38:03 +00:00
Nicholas Marriott 3e9d9a2119 Fix arguments to switch-client. 2009-07-16 22:50:49 +00:00
Nicholas Marriott aa3403a343 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-15 08:05:56 +00:00
Jason McIntyre 5d91555c7c zap trailing whitespace; 2009-07-13 20:14:23 +00:00
Nicholas Marriott 023d8d38ec 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-13 17:47:46 +00:00
Nicholas Marriott 88555d96d5 Document the -k flag to new-window. 2009-07-12 23:45:03 +00:00
Nicholas Marriott 22d51ec1ea 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-12 16:15:34 +00:00
Nicholas Marriott 22355ce947 If it exist, load a system-wide configuration file /etc/tmux.conf before any
user-specified one.
2009-07-12 16:07:56 +00:00
Nicholas Marriott e415ead361 Add -r to the synopsis of the paste-buffer command, prompted by jmc. 2009-07-11 20:04:19 +00:00