summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Infrastructure and commands to manage the environment for processes startednicm2009-08-081-1/+3
| | | | | | | | | | | | | | | within tmux. There is a global environment, copied from the external environment when the server is started and each sesssion has an (initially empty) session environment which overrides it. New commands set-environment and show-environment manipulate or display the environments. A new session option, update-environment, is a space-separated list of variables which are updated from the external environment into the session environment every time a new session is created - the default is DISPLAY.
* Merge pane number into the target specification for pane commands. Instead ofnicm2009-07-301-1/+86
| | | | | | | | | | | | | | 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 thenicm2009-07-291-8/+47
| | | | | | | | | 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.nicm2009-07-261-83/+59
| | | | | | | | | | | | | | 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.nicm2009-07-241-2/+2
|
* Tidy the target parsing code a bit and correct the behaviour so that as beforenicm2009-07-221-54/+90
| | | | | | | | 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 thenicm2009-07-171-1/+2
| | | | | | | | | | 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.nicm2009-07-151-2/+2
|
* Tidy up and improve target (-t) argument parsing:nicm2009-07-131-50/+372
| | | | | | | | | | | | | | - 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 secondnicm2009-07-091-1/+2
| | | | | | | | 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 commandsnicm2009-07-071-3/+6
| | | | | | | "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 \;").nicm2009-06-041-2/+4
|
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+393
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