aboutsummaryrefslogtreecommitdiff
path: root/cmd-choose-tree.c
Commit message (Collapse)AuthorAge
* Replace %% in command lists (by copying them) for template arguments ,nicm2021-08-27
| | | | | this means they can be used with {} as well. Also make argument processing from an existing vector preserve commands. GitHub issue 2858.
* Add args parsing callback for some future work, currently unused.nicm2021-08-21
|
* Permit shortcut keys in buffer, client, tree modes to be configured withnicm2021-04-12
| | | | a format; the default remains the line number. GitHub issue 2636.
* Add a customize mode where keys and options may be browsed and changed,nicm2020-05-16
| | | | | includes adding a brief description of each option. Bound to "C" by default.
* Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm2020-04-13
| | | | use more clearly defined and preparation for some future work).
* Make struct cmd local to cmd.c and move it out of tmux.h.nicm2020-04-13
|
* Now that copy mode copies the pane content rather than keeping anicm2020-04-10
| | | | | | | | | | reference to it, it isn't necessary that the pane in copy mode is the same as the one copying from. Add a -s flag to copy-mode to specify a different pane for the source content. This means it is possible to view two places in a pane's history at the same time in different panes, or copy from a pane's history into an editor or shell in the same pane. From Anindya Mukherjee.
* Add a flag to reverse sort in the various choose modes, from Benjaminnicm2019-08-16
| | | | Poirier in GitHub issue 1875.
* Add [template] to display-panes and choose-{buffer,client,tree} usagekn2018-11-15
| | | | OK nicm
* Add -Z flag to choose-tree, choose-client, choose-buffer tonicm2018-02-28
| | | | | | automatically zoom the pane when the mode is entered and unzoom when it exits, assuming the pane is not already zoomed. Add -Z to the default key bindings.
* Only show the first member of session groups in tree mode (-G flagnicm2017-11-02
| | | | disables).
* Key (v) and flag (-N) to toggle preview in choose modes.nicm2017-08-23
|
* Add -F to choose-tree, choose-client, choose-buffer to specify thenicm2017-08-09
| | | | | format of each line, as well as adding a couple of formats needed for the default display.
* Extend filters (f key) to buffer and client mode and add -f flag tonicm2017-06-09
| | | | specify to command.
* Add -O option to choose-* to set initial sort order.nicm2017-06-09
|
* 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.
* 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.
* Mass rename struct cmd_q to struct cmdq_item and related.nicm2016-10-16
|
* Add static in cmd-* and fix a few other nits.nicm2016-10-10
|
* Instead of combined flags for -c, -s, -t, split into different setsnicm2015-12-14
| | | | using an enum and simplify the parsing code.
* Use member names in cmd_entry definitions so I stop getting confusednicm2015-12-13
| | | | about the order.
* 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.
* Rewrite of the target resolution internals to be simpler and morenicm2015-04-27
| | | | | | | consistent but with much less duplication, but keeping the same internal API. Also adds more readable aliases for some of the special tokens used in targets (eg "{start}" instead of "^"). Some behaviours may have changed, for example prefix matches now happen before fnmatch.
* Move template defines back into .c files.nicm2014-10-20
|
* 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.
* Remove the barely-used and unnecessary command check() function.nicm2013-10-10
|
* When using choose-tree -u, start with the current windowNicholas Marriott2013-04-22
| | | | highlighted. From Thomas Adam.
* Get session of -t window rather than client's window.Nicholas Marriott2013-04-22
|
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-03-24
| | | | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
* Make choose-tree actually work again.Nicholas Marriott2013-03-21
|
* Run session command before window in choose-tree.Nicholas Marriott2013-03-21
|
* Allow choose commands to be used outside tmux, so long as at least oneNicholas Marriott2013-03-21
| | | | client is attached.
* Fix some blank line nits.Nicholas Marriott2013-01-17
|
* Add a -u flag to choose-tree to start uncollapsed, from Raghavendra DNicholas Marriott2012-12-24
| | | | Prabhu.
* Use ACS characters for choose-tree arrows based on diff from RomainNicholas Marriott2012-09-24
| | | | Francoise.
* Use the right index when adding item in choose-tree, from Thomas Adam.Nicholas Marriott2012-09-03
|
* Remove an unused variable.Nicholas Marriott2012-09-03
|
* Change format of choose-tree arrows slightly, from Romain Francoise.Nicholas Marriott2012-09-03
|
* Use a separate define for each default format template and strip clutterNicholas Marriott2012-08-14
| | | | from the choose-tree defaults.
* Fix a return type.Nicholas Marriott2012-08-11
|
* Nuke unused variable from Thomas Adam.Nicholas Marriott2012-07-12
|
* 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
|
* Fix choose-tree usage string.Nicholas Marriott2012-07-09
|
* Add choose-tree command to show windows and sessions in the sameNicholas Marriott2012-07-08
list. Change choose-window and -session to use the same code. From Thomas Adam.