summaryrefslogtreecommitdiffstats
path: root/cmd-choose-session.c
AgeCommit message (Collapse)Author
2012-07-11Sync OpenBSD patchset 1146:Tiago Cunha
Add choose-tree command to show windows and sessions in the same list. Change choose-window and -session to use the same code. From Thomas Adam.
2012-07-04Sync OpenBSD patchset 1143:Tiago Cunha
Provide common helper function for adding windows and sessions to choose lists and expand %% in command before using it rather than at callback time. From Thomas Adam.
2012-07-04Sync OpenBSD patchset 1142:Tiago Cunha
Clean up and simplify the choose mode code, from Thomas Adam.
2012-05-22Sync OpenBSD patchset 1119:Tiago Cunha
Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam.
2011-07-09Expand the Id keyword. Tiago Cunha
2011-01-07Sync OpenBSD patchset 829:Tiago Cunha
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.
2010-12-22Sync OpenBSD patchset 806:Tiago Cunha
Store sessions in an RB tree by name rather than a list, this is tidier and allows them to easily be shown sorted in various lists (list-sessions/choose-sessions). Keep a session index which is used in a couple of places internally but make it an ever-increasing number rather than filling in gaps with new sessions.
2010-12-22Sync OpenBSD patchset 800:Tiago Cunha
Don't nuke the index counter when a session group comes up.
2009-11-14Sync OpenBSD patchset 539:Tiago Cunha
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.
2009-10-11Sync OpenBSD patchset 371:Tiago Cunha
Add "grouped sessions" which have independent name, options, current window and so on but where the linked windows are synchronized (ie creating, killing windows and so on are mirrored between the sessions). A grouped session may be created by passing -t to new-session. Had this around for a while, tested by a couple of people.
2009-09-07Sync OpenBSD patchset 320:Tiago Cunha
Reference count clients and sessions rather than relying on a saved index for cmd-choose-*.
2009-08-25Include <ctype.h>.Tiago Cunha
2009-08-25Sync OpenBSD patchset 294:Tiago Cunha
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).
2009-07-28Sync OpenBSD patchset 181:Tiago Cunha
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.
2009-07-17A similar for fix for window_choose: don't rely on the callback always beingNicholas Marriott
called to free data, have a separate free callback and call it from the mode cleanup code.
2009-07-14Having fixed flags for single-character getopt options is a bit hard toNicholas Marriott
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.
2009-05-04Space trimmage mega-diff.Nicholas Marriott
2009-01-19Pass return code from _exec; allow command sequences to work from the ↵Nicholas Marriott
command line.
2009-01-18Don't die when run non-interactively. DOH.Nicholas Marriott
2009-01-18find-window command.Nicholas Marriott
2009-01-18Show (attached) for attached sessions.Nicholas Marriott
2009-01-17Tidy a few warnings.Nicholas Marriott
2009-01-15Two new commands, choose-window and choose-session which work only when ↵Nicholas Marriott
bound to a key and allow the window or session to be selected from a list.