summaryrefslogtreecommitdiffstats
path: root/cmd-list-keys.c
AgeCommit message (Collapse)Author
2023-01-17Support -1 without -N for list-keys.nicm
2021-08-21Add args parsing callback for some future work, currently unused.nicm
2021-08-20Hide struct args behind a couple of accessor functions.nicm
2021-08-20Remove stray spaces after function names.nicm
2021-04-13Include modifiers when looking up an individual key.nicm
2021-04-12Add a flag to disable keys to close a message, GitHub issue 2625.nicm
2020-07-27Add a -d option to display-message to set delay, from theonekeyg atnicm
gmail dot com in GitHub issue 2322.
2020-07-06Always send xterm-style keys for M-Left and M-Right. GitHub issue 2296.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-16Support embedded styles in the display-message message, GitHub issuenicm
2206.
2020-04-13Make client -c and -t handling common in cmd-queue.c and try to benicm
clearer about whether the client is the target client (must have a session) or not.
2020-04-13Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make itsnicm
use more clearly defined and preparation for some future work).
2020-04-13Make struct cmd local to cmd.c and move it out of tmux.h.nicm
2020-04-09A couple of other redundant checks/assignments.nicm
2020-04-05Add an argument to list-commands to show only a single command.nicm
2020-02-15Add -a to list-keys to also list keys without notes with -N, suggestednicm
by Shehu Dikko.
2020-01-27Add support for adding a note to a key binding (with bind-key -N) andnicm
use this to add descriptions to the default key bindings. A new -N flag to list-keys shows key bindings with notes rather than the default bind-key command used to create them. Change the default ? binding to use this to show a readable summary of keys. Also extend command-prompt to return the name of the key pressed and add a default binding (/) to show the note for the next key pressed Suggested by Alex Tremblay in GitHub issue 2000.
2019-10-14Some old tmux versions can sometimes generate layout strings which havenicm
the incorrect size for the top cell. Previously tmux didn't care but now that panes can be partly hidden, the size matters and is checked more strictly. So add some code to fix up the most common problem and a sanity check to reject layouts with any other size problems. Reported by Aleksandrs Ledovskis in GitHub issue 1930.
2019-10-03Use a malloc'd buffer for lsk since commands can be very long, from Gregory ↵nicm
Pakosz.
2019-10-03Do not lazily use BUFSIZ for "I don't care what size" when buildingnicm
strings because it is only guaranteed to be 256 bytes and even the default 1024 is not always enough. Reported by Gregory Pakosz.
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.
2018-08-02Make key trees and some other bits static.nicm
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-21Store state shared between multiple commands in the queue in a sharednicm
structure.
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.
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-14Add CMD_AFTERHOOK flag to the easy commands that don't need any special ↵nicm
handling.
2016-10-12Drop the edit mode key tables and just use fixed key bindings for thenicm
command prompt.
2016-10-11Fundamental change to how copy mode key bindings work:nicm
The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually.
2016-09-12Allow repeat count to be specified in mode key tables with bind-key -R,nicm
and set the default repeat count to 5 for WheelUp and WheelDown in copy-mode.
2016-06-15Add -F to list-commands.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-15Allow list-keys and list-commands to be run without a running server.nicm
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-11-27Do not set a limit on the length of commands when printing them.nicm
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-12Add utf8_padcstr and use it to align columns in list-keys.nicm
2015-11-12Support UTF-8 key bindings by expanding the key type from int tonicm
uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
2015-10-26Handle unknown keys more gracefully, return a string instead of NULL.nicm
2015-04-20Support for multiple key tables to commands to be bound to sequences ofnicm
keys. The default key bindings become the "prefix" table and -n the "root" table. Keys may be bound in new tables with bind -T and switch-client -T used to specify the table in which the next key should be looked up. Based on a diff from Keith Amling.
2014-10-20Tidy up some includes.nicm
2014-10-20Move list-commands into list-keys.nicm
2014-10-20Instead of setting up the default keys by building the key structnicm
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.
2013-10-10Remove the barely-used and unnecessary command check() function.nicm
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
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.
2013-03-22Add copy-pipe mode command to copy selection and also pipe to a command.Nicholas Marriott
2012-10-15Fix some function prototypes from Helmut Tessarek.Nicholas Marriott
2012-07-11Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott
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.
2012-01-21Use RB trees not SPLAY.Nicholas Marriott