History log of /openbsd-src/usr.bin/tmux/cmd-command-prompt.c (Results 51 – 67 of 67)
Revision Date Author Comments
# b3a5ab26 02-Jul-2011 nicm <nicm@openbsd.org>

Allow the initial context on prompts to be set with the new -I option to
command-prompt. From Tiago Cunha.


# e71ec0f6 20-May-2011 nicm <nicm@openbsd.org>

Pass prompts through status_replace so that they can be more helpful
(such as showing the previous session name when renaming). From Tiago
Cunha.


# a410d86c 05-Jan-2011 nicm <nicm@openbsd.org>

Whoops, command-prompt can take 0 or 1 argument.


# ca7befcc 04-Jan-2011 nicm <nicm@openbsd.org>

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.

show more ...


# 643277e2 05-May-2010 nicm <nicm@openbsd.org>

Identical behaviour to select-prompt can now be obtained with
command-prompt, so remove select-prompt and change ' to be bound to
command-prompt -p index "select-window -t :%%".


# 0e9de5d4 13-Nov-2009 nicm <nicm@openbsd.org>

Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.


# dcab6980 21-Sep-2009 nicm <nicm@openbsd.org>

Use KEYC_NONE constant instead of 0 on init.


# be3558ae 25-Aug-2009 nicm <nicm@openbsd.org>

Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitab

Add a choose-client command and extend choose-{session,window} to accept a
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).

show more ...


# 61b70657 23-Aug-2009 nicm <nicm@openbsd.org>

The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.


# 3a89195f 19-Aug-2009 nicm <nicm@openbsd.org>

Extend command-prompt with a -p option which is a comma-separated list of one
or more prompts to present in order.

The responses to the prompt are replaced in the template string: %% are
replaced in

Extend command-prompt with a -p option which is a comma-separated list of one
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.

show more ...


# 6d0edb75 13-Aug-2009 nicm <nicm@openbsd.org>

Switch the prompt code to return an empty string when the user enters no
response and reserve NULL for an explicit cancel. Change all callbacks to treat
them the same so no functional change.

Also a

Switch the prompt code to return an empty string when the user enters no
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.

show more ...


# 454be688 26-Jul-2009 nicm <nicm@openbsd.org>

Make all messages sent between the client and server fixed size.

This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly wi

Make all messages sent between the client and server fixed size.

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.

show more ...


# f475c9a8 20-Jul-2009 nicm <nicm@openbsd.org>

Kill some dead stores and fix a null pointer deref, found by clang.


# e468f8d3 17-Jul-2009 nicm <nicm@openbsd.org>

Memory could be leaked if a second prompt or message appeared while another was
still present, so add a separate prompt free callback and make the _clear
function responsible for calling it if necess

Memory could be leaked if a second prompt or message appeared while another was
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.

show more ...


# 22864d78 15-Jul-2009 nicm <nicm@openbsd.org>

Make status_message_set a variadic printf-like function. No functional change -
helpful for a couple of things coming soon.


# 0b2ec5a7 13-Jul-2009 nicm <nicm@openbsd.org>

Having fixed flags for single-character getopt options is a bit hard to
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

Having fixed flags for single-character getopt options is a bit hard to
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.

show more ...


# 311827fb 01-Jun-2009 nicm <nicm@openbsd.org>

Import tmux, a terminal multiplexor allowing (among other things) a single
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one termin

Import tmux, a terminal multiplexor allowing (among other things) a single
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

show more ...


123