summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/options.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not try to parse command when unsetting, GitHub issue 1788.nicm2019-06-081-2/+2
|
* Remove a leftover abort and some fixes from cppcheck.nicm2019-05-301-2/+3
|
* Break the argument escaping code into a separate function and use it tonicm2019-05-231-2/+2
| | | | escape key bindings in list-keys. Also escape ~ and ; and $ properly.
* Replace the split parser code (cfg.c and cmd-string.c) with a singlenicm2019-05-231-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | parser using yacc(1). This is a major change but is clearer and simpler and allows some edge cases to be made more consistent, as well as tidying up how aliases are handled. It will also allow some further improvements later. Entirely the same parser is now used for parsing the configuration file and for string commands. This means that constructs previously only available in .tmux.conf, such as %if, can now be used in string commands (for example, those given to if-shell - not commands invoked from the shell, they are still parsed by the shell itself). The only syntax change I am aware of is that #{} outside quotes or a comment is now considered a format and not a comment, so #{ is now a syntax error (notably, if it is at the start of a line). This also adds two new sections to the man page documenting the syntax and outlining how parsing and command execution works. Thanks to everyone who sent me test configs (they still all parse without errors - but this doesn't mean they still work as intended!). Thanks to Avi Halachmi for testing and man page improvements, also to jmc@ for reviewing the man page changes.
* Fix some indentation and dead assignments.nicm2019-05-121-4/+11
|
* Merge hooks into options and make each one an array option. This allowsnicm2019-04-261-19/+56
| | | | | | | multiple commands to be easily bound to one hook. set-hook and show-hooks remain but they are now variants of set-option and show-options. show-options now has a -H flag to show hooks (by default they are not shown).
* Make options_tostring allocate its result instead of using a stacknicm2019-04-251-24/+17
| | | | buffer (needed for something in the future).
* Indicate an array option with a flag rather than a special type so thatnicm2019-04-231-95/+116
| | | | in future will not have to be strings.
* The individual -fg, -bg and -attr options have been deprecated (innicm2019-03-181-46/+1
| | | | | favour of -style), undocumented and hidden from show-options since 2014. Remove them, except for status-fg and status-bg.
* Make array options a sparse tree instead of an array of char * andnicm2019-03-181-52/+112
| | | | remove the size limit.
* Add a way to set individual defaults for an array option.nicm2019-03-151-5/+10
|
* Add a wrapper (struct style) around styles rather than using thenicm2019-03-141-16/+16
| | | | grid_cell directly. There will be some non-cell members soon.
* Fix filtering so it works after the change to only show windows if theynicm2017-08-091-2/+1
| | | | have multiple panes.
* Style and spacing nits.nicm2017-05-311-2/+2
|
* Memory leaks, from David CARLIER.nicm2017-04-221-2/+2
|
* Handle empty options correctly.nicm2017-03-081-1/+3
|
* When a flag option is used in a format, it should use the number formnicm2017-01-301-3/+6
| | | | not string.
* If given an array option without an index either show or set all items,nicm2017-01-241-35/+52
| | | | | | and support -a for array options. Allow the separator for set to be specified in the options table (will be used for backwards compatibility later).
* Do not reset idx, it has just been set.nicm2017-01-181-2/+1
|
* options_match needs to explicitly check for user options.nicm2017-01-181-1/+7
|
* Correctly handle -style options without all of a corresponding -fg/-bg/-attr.nicm2017-01-161-4/+7
|
* getopt() has a struct option so just return to using options_entry.nicm2017-01-161-54/+54
|
* Major tidy up and rework of options tree and set-option/show-optionsnicm2017-01-151-111/+534
| | | | | | | | commands this pushes more of the code into options.c and ties it more closely to the options table rather than having an unnecessary split. Also add support for array options (will be used later). Only (intentional) user visible change is that show-options output is now passed through vis(3) with VIS_DQ so quotes are escaped.
* Append needs to go old,new not new,old...nicm2017-01-151-2/+2
|
* options_get_style return const too.nicm2017-01-131-2/+2
|
* Make options_get_string return const string.nicm2017-01-131-2/+2
|
* Simplify appending to string options.nicm2017-01-121-21/+23
|
* Some tidying and tweaks to options code.nicm2017-01-111-29/+31
|
* Loads more static, except for cmd-*.c and window-*.c.nicm2016-10-101-3/+2
|
* Support set -a (append) with user options, suggested by Xandor Schiefer.nicm2016-09-261-2/+6
|
* I no longer use my SourceForge address so replace it.nicm2016-01-191-2/+2
|
* We cannot do hooks_find and then hooks_remove because it might have comenicm2015-12-111-22/+22
| | | | | | | from the parent (global) tree, instead make it remove by name like options. While here, also tidy up a few bits of options and hooks handling (use RB_FOREACH_SAFE, and a helper function for the free).
* Spacing nits.nicm2015-12-081-2/+2
|
* Sync the entire xmalloc.[ch] with the other users, but with the additionnicm2015-11-181-7/+7
| | | | of xrealloc, xvasprintf, xvsnprintf.
* Log option names in fatal() for missing option.nicm2015-11-131-7/+7
|
* Move struct options into options.c.nicm2015-10-271-3/+27
|
* When given an invalid style, don't set the option to the default. Fixnicm2015-02-181-7/+13
| | | | | from J Raynor. Also make style_parse not alter the grid_cell when it fails.
* Better format for printf format attributes.nicm2014-10-201-2/+2
|
* Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm2014-01-281-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Style and comment fixes from Tiago Cunha.nicm2014-01-091-2/+2
|
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-9/+10
|
* Use RB trees not SPLAY.nicm2012-01-211-12/+12
|
* Drop the ability to have a list of keys in the prefix in favour of twonicm2012-01-211-42/+1
| | | | | | | | | | 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 :-).
* Permit multiple prefix keys to be defined, separated by commas, for example:nicm2009-09-221-1/+42
| | | | | | | 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.
* Use option print function for info messages as well.nicm2009-09-211-4/+5
|
* Drop tiny union from option struct.nicm2009-09-211-9/+9
|
* Make some functions which return unused values void (mostly found by lint) andnicm2009-07-211-4/+3
| | | | tweak a redundant expression in window_pane_set_mode.
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+160
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti