summaryrefslogtreecommitdiffstats
path: root/cfg.c
AgeCommit message (Collapse)Author
2019-12-19Merge branch 'obsd-master'Thomas Adam
2019-12-19When adding a list with multiple commands to the queue, the next item tonicm
insert after needs to be the last one added, not the first. Reported by Jason Kim in GitHub issue 2023.
2019-12-12Merge branch 'obsd-master'Thomas Adam
2019-12-12Change source-file to use new file code which allows it to read fromnicm
stdin.
2019-12-10Merge branch 'obsd-master'Thomas Adam
2019-12-10Make TMUX_CONF a list of files and expand leading $FOO or ~.nicm
2019-06-20Merge branch 'obsd-master'Thomas Adam
2019-06-20Expand command formats in %if and move the config file loading later (tonicm
when the first client has identified) so all the client formats are available, fixes problems reported by Thomas Sattler.
2019-06-18Merge branch 'obsd-master'Thomas Adam
2019-06-18Add a cmdq_continue function rather than twiddling the flag directly.nicm
2019-06-05Merge branch 'obsd-master'Thomas Adam
2019-06-05Add a -v flag to source-file to show the commands and line numbers.nicm
2019-05-23Merge branch 'obsd-master'Thomas Adam
2019-05-23Fix line numbers - commands are added after the line ends so they need tonicm
get line - 1.
2019-05-23Merge branch 'obsd-master'Thomas Adam
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-20Merge branch 'obsd-master'Thomas Adam
2019-05-20Fix ordering of source-file with multiple files and add flags to load_cfg.nicm
2019-05-03Merge branch 'obsd-master'Thomas Adam
2019-05-03Fix order of insertion in load_cfg.nicm
2019-04-18Merge branch 'obsd-master'Thomas Adam
2019-04-18Pass target client and session to load_cfg from source-file so formatsnicm
work. Reported by Thomas Sattler.
2019-04-03Merge branch 'obsd-master'Thomas Adam
2019-04-03Do not load /etc/tmux.conf if given -f.nicm
2019-03-12Merge branch 'obsd-master'Thomas Adam
2019-03-12Allow multiple modes to be open in a pane. A stack of open modes is keptnicm
and the previous restored when the top is exited. If a mode that is already on the stack is entered, the existing instance is moved to the top as the active mode rather than being opened new.
2019-03-08Merge branch 'obsd-master'Thomas Adam
2019-03-08Make the mode used to view command output (a variant of copy mode) usenicm
its own mode definition struct with a different init function rather than calling special setup functions.
2019-03-07Merge branch 'obsd-master'Thomas Adam
2019-03-07Tidy changing the mode into window_copy_init_for_output.nicm
2019-02-16Merge branch 'obsd-master'Thomas Adam
2019-02-16Use starting client cwd in config file, GitHub issue 1606.nicm
2018-01-17Merge branch 'obsd-master'Thomas Adam
2018-01-15Some unused code, GitHub issue 1219.nicm
2017-10-06Merge branch 'obsd-master'Thomas Adam
2017-10-06Support %else in config files to match %if, from Brad Town in GitHubnicm
issue 1071.
2017-05-31Differences to OpenBSD.Nicholas Marriott
2017-05-31Merge branch 'obsd-master'Thomas Adam
Conflicts: Makefile.am cfg.c server-client.c
2017-05-30Rewrite of choose mode, both to simplify and tidy the code and to addnicm
some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
2017-05-01Merge branch 'obsd-master'Thomas Adam
2017-05-01In order that people can use formats like #D in #() in the status linenicm
and not have to wait for an update when they change pane, we allow commands to run more than once a second if the expanded form changes. Unfortunately this can mean them being run far too often (pretty much continually) when multiple clients exist, because some formats (including #D) will always differ between clients. To avoid this, give each client its own tree of jobs which means that the same command will be different instances for each client - similar to how we have the tag to separate commands for different panes. GitHub issue 889; test case reported by Paul Johnson.
2017-04-25Merge branch 'obsd-master'Thomas Adam
2017-04-25Block the initial client if there is one until the configuration filenicm
has finished loading.
2017-04-21Merge branch 'obsd-master'Thomas Adam
2017-04-21History needs to be loaded after config parsing is done - now thatnicm
commands are queued, that's in cfg_done not after start_cfg finishes.
2017-04-21Do not run the config file in the context of the first client, insteadnicm
use no client like we did before. This means commands like new-session won't try to attach if they are in the config file.
2017-04-06Merge branch 'obsd-master'Thomas Adam
Conflicts: server-client.c tmux.1
2017-04-05cfg_file can be static.nicm
2017-02-03Merge branch 'obsd-master'Thomas Adam
2017-02-03Add a window or pane id "tag" to each format tree and use it to separatenicm
jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.