aboutsummaryrefslogtreecommitdiff
path: root/cmd-set-option.c
Commit message (Collapse)AuthorAge
...
* Instead of every command resolving the target (-t or -s) itself, preparenicm2015-12-13
| | | | | | | | | | | | | | | | the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
* Add key-table option to set the default key table for a session, allowsnicm2015-12-12
| | | | different key bindings for different sessions and a few other things.
* Allow prefix and prefix2 to be set to None to disable (useful if younicm2015-12-12
| | | | would rather bind the prefix in the root table).
* Instead of separate tables for different types of options, give eachnicm2015-11-20
| | | | option a scope type (server, session, window) in one table.
* Use __unused rather than rolling our own.nicm2015-11-18
|
* Support UTF-8 key bindings by expanding the key type from int tonicm2015-11-12
| | | | | | uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
* Move struct options into options.c.nicm2015-10-27
|
* Remove some extra blank lines.nicm2015-09-14
|
* Move alerts onto events rather than checking every loop.nicm2015-08-29
|
* Better take on reducing the name timer. Again check for name changes innicm2015-08-29
| | | | | | the main loop after events that may have changed the pane, but do so at most once every 500 millis. If the pane changed too soon, use a timer to ensure that a check happens later.
* Revert previous; we do need a timer, until I have a better idea. Wenicm2015-08-28
| | | | | | can't do the name check every loop, because that is too expensive, and we can't make sure it only happens infrequently because we have no idea when the next change will happen.
* We now only checking for name changes when the active pane has changed,nicm2015-08-28
| | | | | | | but that can only happen when we have already been woken up by a read event, so there is no need for a timer, we can just check the changed flag on the end of that read event (we already loop over the windows to check for bells etc anyway).
* Per-session timers for locking, and remove the global one-second timer.nicm2015-08-28
|
* Run status update on a per-client timer at status-interval.nicm2015-08-28
|
* Make -q suppress ambiguous option warnings too, from Cam Hutchison.nicm2015-07-27
|
* Make unsetting a global option restore it to the default. Diff lyingnicm2015-06-04
| | | | around for a while, I have forgotten who suggested it :-/.
* Convert clients list into a TAILQ.nicm2015-04-24
|
* Allow choice options (multiple states) to be toggled between states 0nicm2015-04-24
| | | | and 1.
* Change the windows array into an RB tree and fix some places where wenicm2015-04-22
| | | | were only looking at the first winlink for a window in a session.
* Instead of setting up the default keys by building the key structnicm2014-10-20
| | | | | | | | | 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-01
|
* Some more long lines.nicm2014-04-17
|
* Remove the "info" message mechanism, this was only used for about fivenicm2014-04-17
| | | | | | 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-17
| | | | options - this will allow options to be removed more easily.
* Don't crash when given a invalid colour, reported by Felix Rosencrantz,nicm2014-02-17
| | | | fix from Thomas Adam.
* Style nit - no space between function name and bracket.nicm2014-02-14
|
* Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm2014-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | 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-10
|
* Clarify error messages when setting options, from Thomas Adam.Nicholas Marriott2013-07-05
|
* Add a -o option to set-option to prevent setting an option already set,Nicholas Marriott2013-03-24
| | | | from Thiago Padilha.
* Add user options, prefixed with @. May be set to any arbitrary string.Nicholas Marriott2013-03-21
|
* Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott2012-07-11
| | | | | | 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.Nicholas Marriott2012-07-10
|
* Do not fire name timer when automatic-rename is off, from Tim Ruehsen aNicholas Marriott2012-04-08
| | | | while ago.
* Add -q option to set-option to turn off info message, from marcel partap.Nicholas Marriott2012-03-17
|
* Allow a single option to be specified to show-options to show just thatNicholas Marriott2012-02-25
| | | | option.
* Drop the ability to have a list of keys in the prefix in favour of twoNicholas Marriott2012-01-21
| | | | | | | | | | 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 preferNicholas Marriott2011-04-05
| | | | | 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 nameNicholas Marriott2011-03-29
| | | | regardless of the -s or -w flags (these remain documented however).
* Checking for particular options and redrawing is not necessary as weNicholas Marriott2011-03-29
| | | | already redraw unconditionally.
* Update an out-of-date and inaccurate comment.Nicholas Marriott2011-03-29
|
* Simplify the way jobs work and drop the persist type, so all jobs areNicholas Marriott2011-01-26
| | | | | | | | | | | | | | | | | 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 commandsNicholas Marriott2011-01-04
| | | | | | | 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.Nicholas Marriott2011-01-04
|
* Clean up and simplify tmux command argument parsing.Nicholas Marriott2011-01-04
| | | | | | | | | | | | | | | | | | | 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, defaultNicholas Marriott2011-01-01
| | | | | | 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 isNicholas Marriott2010-12-30
| | | | | | | 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 widthNicholas Marriott2010-12-19
| | | | | 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 aNicholas Marriott2010-12-06
| | | | window. From Thomas Adam.
* Two new options:Nicholas Marriott2010-09-26
| | | | | | | | | | | | - 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.