aboutsummaryrefslogtreecommitdiff
path: root/cmd-command-prompt.c
Commit message (Collapse)AuthorAge
...
* Identical behaviour to select-prompt can now be obtained withNicholas Marriott2010-05-05
| | | | | command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
* Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in theNicholas Marriott2009-11-13
| | | | command entry structs and a couple of functions to check/set the flags.
* Use KEYC_NONE constant instead of 0 on init.Nicholas Marriott2009-09-21
|
* Add a choose-client command and extend choose-{session,window} to accept aNicholas Marriott2009-08-25
| | | | | | | | | | | template. After a choice is made, %% (or %1) in the template is replaced by the name of the session, window or client suitable for -t and the result executed as a command. So, for example, "choose-window "killw -t '%%'"" will kill the selected window. The defaults if no template is given are (as now) select-window for choose-window, switch-client for choose-session, and detach-client for choose-client (now bound to D).
* The cursession member in struct cmd_ctx is always either curclient->session orNicholas Marriott2009-08-23
| | | | NULL when curclient is also NULL, so just eliminate it.
* Extend command-prompt with a -p option which is a comma-separated list of oneNicholas Marriott2009-08-19
| | | | | | | | | | | | | | | | | | or more prompts to present in order. The responses to the prompt are replaced in the template string: %% are replaced in order, so the first prompt replaces the first %%, the second replaces the second, and so on. In addition, %1 up to %9 are replaced with the responses to the first the ninth prompts The default template is "%1" so the response to the first prompt is processed as a command. Note that this changes the behaviour for %% so if there is only one prompt, only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'" should be changed to "neww -n '%1' 'ssh %1'". From Tiago Cunha.
* Switch the prompt code to return an empty string when the user enters noNicholas Marriott2009-08-13
| | | | | | | response and reserve NULL for an explicit cancel. Change all callbacks to treat them the same so no functional change. Also add cancel key bindings to emacs mode which were missing.
* Make all messages sent between the client and server fixed size.Nicholas Marriott2009-07-26
| | | | | | | | | | | | | | This is the first of two changes to make the protocol more resilient and less sensitive to other changes in the code, particularly with commands. The client now packs argv into a buffer and sends it to the server for parsing, rather than doing it itself and sending the parsed command data. As a side-effect this also removes a lot of now-unused command marshalling code. Mixing a server without this change and a client with or vice versa will cause tmux to hang or crash, please ensure that tmux is entirely killed before upgrading.
* Kill some dead stores and fix a null pointer deref, found by clang.Nicholas Marriott2009-07-20
|
* Memory could be leaked if a second prompt or message appeared while another wasNicholas Marriott2009-07-17
| | | | | | | | | | | still present, so add a separate prompt free callback and make the _clear function responsible for calling it if necessary (rather than the individual prompt callbacks). Also make both messages and prompts clear any existing when a new is set. In addition, the screen could be modified while the prompt is there, restore the redraw-entire-screen behaviour on prompt clear; add a comment as a reminder.
* Make status_message_set a variadic printf-like function. No functional change -Nicholas Marriott2009-07-15
| | | | helpful for a couple of things coming soon.
* Having fixed flags for single-character getopt options is a bit hard toNicholas Marriott2009-07-13
| | | | | | | | | maintain and is only going to get worse as more are used. So instead, add a new uint64_t member to cmd_entry which is a bitmask of upper and lowercase options accepted by the command. This means new single character options can be used without the need to add it explicitly to the list.
* Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott2009-06-01
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti