summaryrefslogtreecommitdiffstats
path: root/options.c
AgeCommit message (Collapse)Author
2020-08-25Allow colour to be spelt as color, from Boris Verkhovsky. GitHub issuenicm
2317.
2020-06-16d and D keys to reset to default in customize mode.nicm
2020-05-16Separate key flags and modifiers, log key flags, make the "xterm" flagnicm
more explicit and fix M- keys with a leading escape.
2020-05-16Add a customize mode where keys and options may be browsed and changed,nicm
includes adding a brief description of each option. Bound to "C" by default.
2020-05-16Drop having a separate type for style options and make them all strings,nicm
which allows formats to be expanded. Any styles without a '#{' are still validated when they are set but any with a '#{' are not. Formats are not expanded usefully in many cases yet, that will be changed later. To make this work, a few other changes: - set-option -a with a style option automatically appends a ",". - OSC 10 and 11 don't set the window-style option anymore, instead the fg and bg are stored in the pane struct and act as the defaults that can be overridden by window-style. - status-fg and -bg now override status-style instead of trying to keep them in sync.
2019-12-03Style nits in function arguments.nicm
2019-10-15Rewrite options_array_set to be clearer and remove a spurious warningnicm
with newer GCC. From Ben Boeckel.
2019-10-14Memory leaks, from Igor Wong in GitHub issue 1934.nicm
2019-06-23Do not always set scope for panes because the window check might fail,nicm
GitHub issue 1810.
2019-06-20FIx return of options_scope_from_name on error.nicm
2019-06-20Add a per-pane option set. Pane options inherit from window options (sonicm
there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
2019-06-20Add a helper function to work out option table from name.nicm
2019-06-08Do not try to parse command when unsetting, GitHub issue 1788.nicm
2019-05-30Remove a leftover abort and some fixes from cppcheck.nicm
2019-05-23Break the argument escaping code into a separate function and use it tonicm
escape key bindings in list-keys. Also escape ~ and ; and $ properly.
2019-05-23Replace the split parser code (cfg.c and cmd-string.c) with a singlenicm
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.
2019-05-12Fix some indentation and dead assignments.nicm
2019-04-26Merge hooks into options and make each one an array option. This allowsnicm
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).
2019-04-25Make options_tostring allocate its result instead of using a stacknicm
buffer (needed for something in the future).
2019-04-23Indicate an array option with a flag rather than a special type so thatnicm
in future will not have to be strings.
2019-03-18The individual -fg, -bg and -attr options have been deprecated (innicm
favour of -style), undocumented and hidden from show-options since 2014. Remove them, except for status-fg and status-bg.
2019-03-18Make array options a sparse tree instead of an array of char * andnicm
remove the size limit.
2019-03-15Add a way to set individual defaults for an array option.nicm
2019-03-14Add a wrapper (struct style) around styles rather than using thenicm
grid_cell directly. There will be some non-cell members soon.
2017-08-09Fix filtering so it works after the change to only show windows if theynicm
have multiple panes.
2017-05-31Style and spacing nits.nicm
2017-04-22Memory leaks, from David CARLIER.nicm
2017-03-08Handle empty options correctly.nicm
2017-01-30When a flag option is used in a format, it should use the number formnicm
not string.
2017-01-24If given an array option without an index either show or set all items,nicm
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).
2017-01-18Do not reset idx, it has just been set.nicm
2017-01-18options_match needs to explicitly check for user options.nicm
2017-01-16Correctly handle -style options without all of a corresponding -fg/-bg/-attr.nicm
2017-01-16getopt() has a struct option so just return to using options_entry.nicm
2017-01-15Major tidy up and rework of options tree and set-option/show-optionsnicm
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.
2017-01-15Append needs to go old,new not new,old...nicm
2017-01-13options_get_style return const too.nicm
2017-01-12Simplify appending to string options.nicm
2017-01-11Some tidying and tweaks to options code.nicm
2016-10-10Loads more static, except for cmd-*.c and window-*.c.nicm
2016-09-26Support set -a (append) with user options, suggested by Xandor Schiefer.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-11We cannot do hooks_find and then hooks_remove because it might have comenicm
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).
2015-12-08Spacing nits.nicm
2015-11-18Sync the entire xmalloc.[ch] with the other users, but with the additionnicm
of xrealloc, xvasprintf, xvsnprintf.
2015-11-13Log option names in fatal() for missing option.nicm
2015-10-27Move struct options into options.c.nicm
2015-02-18When given an invalid style, don't set the option to the default. Fixnicm
from J Raynor. Also make style_parse not alter the grid_cell when it fails.
2014-10-20Better format for printf format attributes.nicm
2014-01-28Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm
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.