aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
Commit message (Collapse)AuthorAge
* Merge branch 'obsd-master'Thomas Adam2017-05-31
|\ | | | | | | | | | | | | Conflicts: Makefile.am cfg.c server-client.c
| * Rewrite of choose mode, both to simplify and tidy the code and to addnicm2017-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'obsd-master'Thomas Adam2017-04-22
|\|
| * Get rid of the extra layer of flags and cmd_prepare() and just store thenicm2017-04-22
| | | | | | | | | | | | CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
* | Merge branch 'obsd-master'Thomas Adam2017-04-21
|\|
| * Make the cmd_find_* functions more obvious when looking for a client,nicm2017-04-21
| | | | | | | | | | rather than having it inside other functions. Should be no change to the way targets are resolved just yet.
* | Merge branch 'obsd-master'Thomas Adam2017-01-24
|\|
| * server-info can become an alias rather than a command.nicm2017-01-24
| |
| * Revert WIP parts of previous I didn't mean to commit yet.nicm2017-01-16
| |
| * getopt() has a struct option so just return to using options_entry.nicm2017-01-16
| |
* | Merge branch 'obsd-master'Thomas Adam2017-01-10
|\|
| * Need to escape ; twice because the command list parser will eat one,nicm2017-01-10
| | | | | | | | reported by Theo Buehler.
* | Merge branch 'obsd-master'Thomas Adam2017-01-10
|\|
| * Quote backslash as well for %%%.nicm2017-01-10
| |
* | Merge branch 'obsd-master'Thomas Adam2017-01-06
|\|
| * Incremental search in copy mode (on for emacs keys by default) - muchnicm2017-01-06
| | | | | | | | | | | | the same as normal searching but updates the cursor position and marked search terms as you type. C-r and C-s in the prompt repeat the search, once finished searching (with Enter), N and n work as before.
* | Merge branch 'obsd-master'Thomas Adam2016-12-28
|\|
| * Fix the prefer unattached session behaviour ofnicm2016-12-28
| | | | | | | | attach-session/switch-client, reported by Thomas Sattle.
* | Merge branch 'obsd-master'Thomas Adam2016-11-02
|\|
| * Make an empty state on error rather than leaving something partiallynicm2016-11-02
| | | | | | | | created (which now is now a fatal() later).
* | Merge branch 'obsd-master'Thomas Adam2016-10-21
|\|
| * Add %%% to substitute with quotes escaped (convert " to \"). Use thisnicm2016-10-21
| | | | | | | | | | for the prompts in copy mode. Fixes problems with jumping to ' reported by Theo Buehler.
* | Merge branch 'obsd-master'Thomas Adam2016-10-16
|\|
| * Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
| |
* | Merge branch 'obsd-master'Thomas Adam2016-10-16
|\|
| * Rewrite command queue handling. Each client still has a command queue,nicm2016-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but there is also now a global command queue. Instead of command queues being dispatched on demand from wherever the command happens to be added, they are now all dispatched from the top level server loop. Command queues may now also include callbacks as well as commands, and items may be inserted after the current command as well as at the end. This all makes command queues significantly more predictable and easier to use, and avoids the complex multiple nested command queues used by source-file, if-shell and friends. A mass rename of struct cmdq to a better name (cmdq_item probably) is coming.
* | Merge branch 'obsd-master'Thomas Adam2016-10-13
|\|
| * Some improvements and bug fixes for hooks:nicm2016-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Prepare the state again before the "after" hooks are run, because the command may have killed or moved windows. - Use the hooks list from the newly prepared target, not the old hooks list (only matters for new-session really). - Correctly detect an invalid current state and ignore it in cmd_find_target ("killw; swapw"). - Change neww, new, killp, killw, splitw, swapp, swapw to update the current state (used if no explicit target is given) to something more useful after they have finished. For example, neww changes it to the newly created window. Hooks are still relatively new and primitive so there are likely to be more changes to come. Parts based on bug reports from Uwe Werler and Iblis Lin.
* | Merge branch 'obsd-master'Thomas Adam2016-10-05
|\|
| * Allow cmd_mouse_at return arguments to be NULL.nicm2016-10-05
| |
* | Merge branch 'obsd-master'Thomas Adam2016-03-02
|\| | | | | | | | | Conflicts: utf8.c
| * Remove some more unused variables, and use RB_FOREACH_SAFE innicm2016-03-01
| | | | | | | | key_bindings_unref_table.
* | Merge branch 'obsd-master'Thomas Adam2016-01-19
|\|
| * Split out getting the current state from the target search so it can benicm2016-01-19
| | | | | | | | replaced if we already know the current.
| * I no longer use my SourceForge address so replace it.nicm2016-01-19
| |
* | Merge branch 'obsd-master'Thomas Adam2015-12-15
|\|
| * Use cmd_find_clear_state instead of an extra function doing the same.nicm2015-12-14
| |
* | Merge branch 'obsd-master'Thomas Adam2015-12-14
|\|
| * Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-14
| | | | | | | | using an enum and simplify the parsing code.
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-13
| | | | | | | | about the order.
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * Actually I thought cmd_get_state_client was unnecessary but it will benicm2015-12-13
| | | | | | | | needed.
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * -c needs to be able for fail for display-message.nicm2015-12-13
| |
| * Remove an unnecessary function.nicm2015-12-13
| |
| * Don't log an error when doing the first check for move-window.nicm2015-12-13
| |
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|
| * Change cmd_find_target to use a state struct from the caller.nicm2015-12-13
| |
* | Merge branch 'obsd-master'Thomas Adam2015-12-13
|\|