aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
Commit message (Collapse)AuthorAge
* Merge pane number into the target specification for pane commands. Instead ofNicholas Marriott2009-07-30
| | | | | | | | | | | | | | using -p index, a target pane is now addressed with the normal -t window form but suffixed with a period and a pane index, for example :0.2 or mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in the current window, if that fails the same rules are followed as for a target window and the current pane in that window used. As a side-effect this now means that swap-pane can swap panes between different windows. Note that this changes the syntax of the break-pane, clear-history, kill-pane, resize-pane, select-pane and swap-pane commands.
* Add an additional heuristic to work out the current session when run from theNicholas Marriott2009-07-29
| | | | | | | | | command line. The name of all slave ptys in the server is known, so if the client was run on a tty, look for any sessions containing that tty and use the most recently created. This is more reliable than looking at $TMUX if windows have been moved or linked between sessions.
* 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.
* cmd_find_index should return -2 on error.Nicholas Marriott2009-07-24
|
* Tidy the target parsing code a bit and correct the behaviour so that as beforeNicholas Marriott2009-07-22
| | | | | | | | a string with no colon as a target window is first looked up as a window then as a session, noted by Iain Morgan. Also attempt to clarify the description of the target specification in the man page.
* - New command display-message (alias display) to display a message in theNicholas Marriott2009-07-17
| | | | | | | | | | status line (bound to "i" and displays the current window and time by default). The same substitutions are applied as for status-left/right. - Add support for including the window index (#I), pane index (#P) and window name (#W) in the message, and status-left or status-right. - Bump protocol version. From Tiago Cunha, thanks!
* Return -1 not NULL on error, pointed out by Roy Marples.Nicholas Marriott2009-07-15
|
* Tidy up and improve target (-t) argument parsing:Nicholas Marriott2009-07-13
| | | | | | | | | | | | | | - move the code back into cmd.c and merge with the existing functions where possible; - accept "-tttyp0" as well as "-t/dev/ttyp0" for clients; - when looking up session names, try an exact match first, and if that fails look for it as an fnmatch pattern and then as the start of a name - if more that one session matches an error is given; so if there is one session called "mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there is also "mysession2", the last two are errors; - similarly for windows, if the argument is not a valid index or exact window name match, try it against the window names as an fnmatch pattern and a prefix.
* New command, if-shell (alias if). Executes the tmux command in the secondNicholas Marriott2009-07-09
| | | | | | | | argument if the shell command in the first succeeds, for example: if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt" Written by Tiago Cunha, many thanks.
* Don't let ambiguous commands override an exact alias match: eg if commandsNicholas Marriott2009-07-07
| | | | | | | "abc-1", "abc-2", "abc-3" exist and "abc-3" has the alias "abc", "tmux abc" should execute abc-3, not complain about the command being ambiguous. Not a problem at the moment but will be soon.
* Print a better message than '(null)' if no command is specified ("tmux \;").Nicholas Marriott2009-06-04
|
* 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