summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
AgeCommit message (Collapse)Author
2011-04-05Add a flag to cmd_find_session so that attach-session can preferNicholas Marriott
unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
2011-03-29For convenience, work out what type of option is being set by nameNicholas Marriott
regardless of the -s or -w flags (these remain documented however).
2011-03-29Checking for particular options and redrawing is not necessary as weNicholas Marriott
already redraw unconditionally.
2011-03-29Update an out-of-date and inaccurate comment.Nicholas Marriott
2011-01-26Simplify the way jobs work and drop the persist type, so all jobs areNicholas Marriott
fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
2011-01-04Now that parsing is common, merge some of the small, related commandsNicholas Marriott
together to use the same code. Also add some arguments (such as -n and -p) to some commands to match existing commands.
2011-01-04argc will be 1 not 2 with no option value.Nicholas Marriott
2011-01-04Clean up and simplify tmux command argument parsing.Nicholas Marriott
Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
2011-01-01Move the user-visible parts of all options (names, types, limit, defaultNicholas Marriott
values) together into one set of tables in options-table.c. Also clean up and simplify cmd-set-options.c and move a common print function into option-table.c.
2010-12-30Change from a per-session stack of buffers to one global stack which isNicholas Marriott
much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
2010-12-19Add other-pane-height and other-pane-width options, allowing the widthNicholas Marriott
or height of the smaller panes in the main-horizontal and main-vertical layouts to be set. Mostly from David Goodlad.
2010-12-06Add an option to alert (monitor) for silence (lack of activity) in aNicholas Marriott
window. From Thomas Adam.
2010-09-26Two new options:Nicholas Marriott
- server option "exit-unattached" makes the server exit when no clients are attached, even if sessions are present; - session option "destroy-unattached" destroys a session once no clients are attached to it. These are useful for preventing tmux remaining in the background where it is undesirable and when using tmux as a login shell to keep a limit on new sessions.
2010-09-01Reset running jobs when the status line is enabled or disabled as well,Nicholas Marriott
some people have it bound to a key.
2010-06-27New option, detach-on-destroy, to set what happens to a client when the sessionNicholas Marriott
it is attached to is destroyed. If on (the default), it is detached; if off, it is switched to the most recently active session.
2010-05-14Colour+attribute options for status line alerts, from Alex Alexander.Nicholas Marriott
2010-02-22Option to set the characters considered word separators in copy mode, fromNicholas Marriott
Micah Cowan.
2010-02-08Add an option to disable the smcup/rmcup alternate screen behaviour insideNicholas Marriott
tmux. From clemens fischer.
2010-02-04Option to display the active pane in a different colour with the display-panesNicholas Marriott
command. From Paul Hoffman, thanks.
2010-01-03Options to set the colour of the pane borders, with different colours for theNicholas Marriott
active pane.
2009-12-14New server option, escape-time, to set the timeout used to detect if escapesNicholas Marriott
are alone or part of a function key or meta sequence.
2009-12-11Use quiet variable, and add missing sentinel to options array.Nicholas Marriott
2009-12-10Add "server options" which are server-wide and not bound to a session orNicholas Marriott
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-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-12-03Eliminate duplicate code and ease the passage for server-wide options by addingNicholas Marriott
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-11-18Add a per-client log of status line messages displayed while that clientNicholas Marriott
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-13Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in theNicholas Marriott
command entry structs and a couple of functions to check/set the flags.
2009-11-01Add a flag for jobs that shouldn't be freed after they've died and use it forNicholas Marriott
status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
2009-10-10Rather than running status-left, status-right and window title #() with popenNicholas Marriott
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-10New option, mouse-select-pane. If on, the mouse may be used to select theNicholas Marriott
current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.
2009-10-10Support for individual session idle time locking. May be enabled by turning offNicholas Marriott
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-09-23Remove the internal tmux locking and instead detach each client and run theNicholas Marriott
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-22Permit multiple prefix keys to be defined, separated by commas, for example:Nicholas Marriott
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-18New option, set-titles-string, to allow the window title to be specified (asNicholas Marriott
for status-left/right) if set-titles is on. Also only update the title when the status line is being redrawn.
2009-09-01When using tmux as a login shell, there is currently no way to specify a shellNicholas Marriott
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-08-31Add a new display-panes command, with two options (display-panes-colour andNicholas Marriott
display-panes-time), which displays a visual indication of the number of each pane.
2009-08-13Add a base-index session option to specify the first index checked when lookingNicholas Marriott
for an index for a new window.
2009-08-11Add flags for 1+2 and 2 arguments to the generic target code, use it forNicholas Marriott
cmd-set-environment/option/window-option and remove the generic options parsing.
2009-08-08Infrastructure and commands to manage the environment for processes startedNicholas Marriott
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-08Options to set the colours and attributes for status-left/-right. From ThomasNicholas Marriott
Adam, thanks.
2009-08-04Add a -a flag to set-option and set-window-option to append to an existingNicholas Marriott
string value, useful for terminal-overrides.
2009-08-03Add a terminal-overrides session option allowing individual terminfo(5) entriesNicholas Marriott
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-07-26Make all messages sent between the client and server fixed size.Nicholas Marriott
This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
2009-07-20Add a status-justify option to allow the window list in the status line to beNicholas Marriott
positioned at the left, centre, or right.
2009-07-18Add three new session options: visual-activity, visual-bell, visual-content. IfNicholas Marriott
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-15Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bitNicholas Marriott
annoying and it is only use for iterating, so use a sentinel to mark the end of each array instead. Different fix for a problem pointed out by Kalle Olavi Niemitalo.
2009-07-13Having fixed flags for single-character getopt options is a bit hard toNicholas Marriott
maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. This means new single character options can be used without the need to add it explicitly to the list.
2009-07-10Add a default-terminal option to set the starting value of $TERM in newNicholas Marriott
windows. This is "screen" by default and must be either that or something closely related. This does makes it easier to customise it if necessary.
2009-07-07Rename the global options variables to be shorter and to make session optionsNicholas Marriott
clear. No functional change, getting this out of the way to make later options changes easier.
2009-06-03New session option, status-utf8, to control the interpretation of top-bit-setNicholas Marriott
characters in status-left and status-right (if on, they are treated as UTF-8; otherwise passed through).