summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-set-option.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Instead of setting up the default keys by building the key structnicm2014-10-201-3/+1
| | | | | | | | | directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
* Various minor style and spacing nits.nicm2014-09-011-3/+3
|
* Some more long lines.nicm2014-04-171-9/+17
|
* Remove the "info" message mechanism, this was only used for about fivenicm2014-04-171-13/+1
| | | | | | mostly useless and annoying messages. Change those commands to silence on success like all the others. Still accept the -q command line flag and "quiet" server option for now.
* Extend the -q flag to set-option to suppress errors about unknownnicm2014-04-171-9/+19
| | | | options - this will allow options to be removed more easily.
* Don't crash when given a invalid colour, reported by Felix Rosencrantz,nicm2014-02-171-3/+5
| | | | fix from Thomas Adam.
* Style nit - no space between function name and bracket.nicm2014-02-141-2/+2
|
* Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm2014-01-281-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | options with a single foo-style option. For example: set -g status-fg yellow set -g status-bg red set -g status-attr blink Becomes: set -g status-style fg=yellow,bg=red,blink The -a flag to set can be used to add to rather than replace a style. So: set -g status-bg red Becomes: set -ag status-style bg=red Currently this is fully backwards compatible (all *-{fg,bg,attr} options remain) but the plan is to deprecate them over time. From Tiago Cunha.
* Remove the barely-used and unnecessary command check() function.nicm2013-10-101-3/+1
|
* Clarify error messages when setting options, from Thomas Adam.nicm2013-07-051-3/+13
|
* Add a -o option to set-option to prevent setting an option already set,nicm2013-03-241-6/+16
| | | | from Thiago Padilha.
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-59/+62
| | | | | | | | | | | | | | | | | | | | | | 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.
* Add user options, prefixed with @. May be set to any arbitrary string.nicm2013-03-211-2/+66
|
* Add -v to set and setw to show only option value.nicm2013-03-211-2/+2
|
* Make command exec functions return an enum rather than -1/0/1 values andnicm2012-07-111-12/+12
| | | | | | add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-2/+2
|
* Do not fire name timer when automatic-rename is off, from Tim Ruehsen anicm2012-04-081-1/+14
| | | | while ago.
* Add -q option to set-option to turn off info message, from marcel partap.nicm2012-03-171-8/+11
|
* Allow a single option to be specified to show-options to show just thatnicm2012-02-251-38/+2
| | | | option.
* Drop the ability to have a list of keys in the prefix in favour of twonicm2012-01-211-24/+12
| | | | | | | | | | separate options, prefix and prefix2. This simplifies the code and gets rid the data options type which was only used for this one option. Also add a -2 flag to send-prefix to send the secondary prefix key, fixing a cause of minor irritation. People who want three prefix keys are out of luck :-).
* Add a flag to cmd_find_session so that attach-session can prefernicm2011-04-051-2/+2
| | | | | unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
* For convenience, work out what type of option is being set by namenicm2011-03-291-41/+66
| | | | regardless of the -s or -w flags (these remain documented however).
* Checking for particular options and redrawing is not necessary as wenicm2011-03-291-14/+1
| | | | already redraw unconditionally.
* Update an out-of-date and inaccurate comment.nicm2011-03-291-6/+2
|
* Simplify the way jobs work and drop the persist type, so all jobs arenicm2011-01-261-22/+3
| | | | | | | | | | | | | | | | | 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).
* Now that parsing is common, merge some of the small, related commandsnicm2011-01-041-2/+13
| | | | | | | together to use the same code. Also add some arguments (such as -n and -p) to some commands to match existing commands.
* argc will be 1 not 2 with no option value.nicm2011-01-041-2/+2
|
* Clean up and simplify tmux command argument parsing.nicm2011-01-041-97/+110
| | | | | | | | | | | | | | | | | | | 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.
* Move the user-visible parts of all options (names, types, limit, defaultnicm2011-01-011-369/+198
| | | | | | 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.
* Change from a per-session stack of buffers to one global stack which isnicm2010-12-301-3/+3
| | | | | | | 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.
* Add other-pane-height and other-pane-width options, allowing the widthnicm2010-12-191-1/+3
| | | | | or height of the smaller panes in the main-horizontal and main-vertical layouts to be set. Mostly from David Goodlad.
* Add an option to alert (monitor) for silence (lack of activity) in anicm2010-12-061-1/+3
| | | | window. From Thomas Adam.
* Two new options:nicm2010-09-261-1/+3
| | | | | | | | | | | | - 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.
* Reset running jobs when the status line is enabled or disabled as well,nicm2010-09-011-1/+2
| | | | some people have it bound to a key.
* New option, detach-on-destroy, to set what happens to a client when the sessionnicm2010-06-271-1/+2
| | | | | it is attached to is destroyed. If on (the default), it is detached; if off, it is switched to the most recently active session.
* Colour+attribute options for status line alerts, from Alex Alexander.nicm2010-05-141-1/+4
|
* Option to set the characters considered word separators in copy mode, fromnicm2010-02-221-1/+2
| | | | Micah Cowan.
* Add an option to disable the smcup/rmcup alternate screen behaviour insidenicm2010-02-081-1/+2
| | | | tmux. From clemens fischer.
* Option to display the active pane in a different colour with the display-panesnicm2010-02-041-1/+2
| | | | command. From Paul Hoffman, thanks.
* Options to set the colour of the pane borders, with different colours for thenicm2010-01-031-1/+5
| | | | active pane.
* New server option, escape-time, to set the timeout used to detect if escapesnicm2009-12-141-1/+2
| | | | are alone or part of a function key or meta sequence.
* Use quiet variable, and add missing sentinel to options array.nicm2009-12-111-1/+2
|
* Add "server options" which are server-wide and not bound to a session ornicm2009-12-101-4/+11
| | | | | | | 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.
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastnicm2009-12-031-13/+13
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* Eliminate duplicate code and ease the passage for server-wide options by addingnicm2009-12-031-19/+337
| | | | | | | 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.
* Add a per-client log of status line messages displayed while that clientnicm2009-11-181-1/+2
| | | | | | | | 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.
* Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in thenicm2009-11-131-6/+6
| | | | command entry structs and a couple of functions to check/set the flags.
* Add a flag for jobs that shouldn't be freed after they've died and use it fornicm2009-11-011-6/+32
| | | | | | | 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 #().
* Rather than running status-left, status-right and window title #() with popennicm2009-10-101-2/+5
| | | | | | | | | | | | | | | | | 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.
* New option, mouse-select-pane. If on, the mouse may be used to select thenicm2009-10-101-1/+2
| | | | | | current pane. Suggested by sthen@ and also by someone else ages ago who I have forgotten.