summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add move-pane command (like join-pane but allows the same window). Alsonicm2012-03-031-1/+2
| | | | | -b flag to join-pane and move-pane to place the pane to the left or above. From George Nachman.
* Don't die if fail to get root directory, from Ben Boeckel.nicm2012-02-061-2/+3
|
* Provide defined ways to set the various default-path possibilities: ~nicm2012-01-311-20/+69
| | | | | | | | | for home directory, . for server start directory, - for session start directory and empty for the pane's working directory (the default). All can also be used as part of a relative path (eg -/foo). Also provide -c flags to neww and splitw to override default-path setting. Based on a diff from sthen. ok sthen
* Give each window a unique id, like panes but prefixed with @. Based onnicm2012-01-301-19/+56
| | | | work from George Nachman.
* Add some const and fix a warning.nicm2012-01-201-3/+3
|
* Allow $HOME as default-path in tmux.conf so the same config file can be usedstsp2011-12-271-1/+8
| | | | | on different machines regardless of where the user's home directory is. ok nicm
* Change the way the working directory for new processes is discovered. Ifnicm2011-12-091-1/+26
| | | | | | | | | | | | | | | | default-path isn't empty, it is used. Otherwise: 1) If tmux neww is run from the command line, the working directory of the client is used. 2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current working directory of the process in the active pane. 3) If that fails, the directory where the session was created is used. Support code by Romain Francois, OpenBSD specific bits by me. Note this requires a recent userland and kernel with KERN_PROC_CWD.
* Add a respawn-pane command, from Marcel Partap.nicm2011-06-051-1/+2
|
* Get rid of the layout string code which tries to walk through the layoutnicm2011-06-051-12/+8
| | | | hierarchy and instead just look at what panes are actually in the window.
* Fix a memory leak if cmd_pane_session succeeds, from Tiago Cunha.nicm2011-05-081-3/+3
|
* Change so that an empty session name always means the current sessionsnicm2011-04-061-3/+9
| | | | | even if given with, for example, -t '', and explicitly forbid empty session names and those containing a : when they are created.
* Add a flag to cmd_find_session so that attach-session can prefernicm2011-04-051-14/+20
| | | | | unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
* Give each pane created in a tmux server a unique id (starting from 0),nicm2011-03-271-12/+89
| | | | | put it in the TMUX_PANE environment variable and accept it as a target. Suggested by and with testing and tweaks from Ben Boeckel.
* Set $TMUX without the session when background jobs are run.nicm2011-01-231-2/+2
|
* Clean up and simplify tmux command argument parsing.nicm2011-01-041-29/+31
| | | | | | | | | | | | | | | | | | | 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.
* Change from a per-session stack of buffers to one global stack which isnicm2010-12-301-2/+1
| | | | | | | much more convenient and also simplifies lot of code. This renders copy-buffer useless and makes buffer-limit now a server option. By Tiago Cunha.
* Store sessions in an RB tree by name rather than a list, this is tidiernicm2010-12-211-25/+34
| | | | | | | | | 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.
* We now send argv to the server after parsing it in the client to get thenicm2010-10-291-1/+17
| | | | | command, so the client should not modify it. Instead, take a copy. Fixes parsing command lists, reported by mcbride@.
* Add a last-pane command (bound to ; by default). Requested ages ago bynicm2010-10-231-1/+2
| | | | somebody whose name I have forgotten.
* Fall back on normal session choice method if $TMUX exists but is invalidnicm2010-10-161-9/+5
| | | | rather than rejecting.
* Make pane/window wrapping more logical (so with 10 windows, +10 fromnicm2010-07-141-80/+79
| | | | window 5 stays in the same place), and tidy the code. From Tiago Cunha.
* Add a choose-buffer command for easier use of the paste buffer stack.nicm2010-06-211-1/+2
|
* Extend the -t:+ and -t:- window targets for next and previous window tonicm2010-06-211-65/+124
| | | | accept an offset such as -t:+2. From Tiago Cunha.
* Identical behaviour to select-prompt can now be obtained withnicm2010-05-051-2/+1
| | | | | command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
* Support up, down, left, right movement through panes with -UDLR flags tonicm2010-03-221-5/+17
| | | | | | | select-pane. Also REMOVE the up- and down-pane commands: equivalent behaviour is now available using -t :.+ and -t :.-.
* Permit !, + and - to be used for window targets to specify last window (!), ornicm2010-01-191-9/+57
| | | | | | next and previous window by number (+ and -). Also tidy an if in cmd-new-window.c.
* New command, join-pane, to split and move an existing pane into the space (likenicm2010-01-071-1/+2
| | | | splitw then movep, or the reverse of breakp).
* Permit panes to be referred to as "top", "bottom", "top-left" etc, if the rightnicm2009-12-081-15/+28
| | | | pane can be identified.
* Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastnicm2009-12-031-12/+12
| | | | | time now I've configured emacs to make them displayed in really annoying colours...
* New command, capture-pane, which copies the entire pane contents to a pastenicm2009-12-011-1/+2
| | | | buffer. From Jonathan Alvarado.
* Use home from struct passwd if HOME is empty as well as if it is NULL, and fixnicm2009-11-211-3/+2
| | | | a style nit. Both from Tiago Cunha.
* Add a per-client log of status line messages displayed while that clientnicm2009-11-181-1/+2
| | | | | | | | exists. A new message-limit session option sets the maximum number of entries and a command, show-messages, shows the log (bound to ~ by default). This (and prompt history) might be better as a single global log but until there are global options it is easier for them to be per client.
* Add an activity time for clients, like for sessions, and change session andnicm2009-11-031-28/+29
| | | | | | | | client lookup to pick the most recently used rather than the most recently created - this is much more useful when used interactively and (because the activity time is set at creation) should have no effect on source-file. Based on a problem reported by Jan Johansson.
* If it isn't available explicitly, work out the current client in a similar waynicm2009-11-031-31/+47
| | | | | to the current session - build a list of the possibilities then pick the newest.
* Change session and client activity and creation time members to have morenicm2009-11-031-5/+5
| | | | | | | | meaningful names. Also, remove the code to try and update the session activity time for the command client when a command message is received as is pointless because it des not have a session.
* When matching the session names with -t, look for exact matches first beforenicm2009-11-021-9/+14
| | | | | | | | trying partial matches. Avoids problems where two ambiguous matches are present before an exact match (eg foo1, foo2, foo would give an error on trying -tfoo), reported by Natacha Port? natbsd at instinctive dot eu.
* tabs are better; ok nicmderaadt2009-10-261-3/+3
|
* cmd_find_client shouldn't die when there is an empty slot in the clientsnicm2009-10-141-8/+9
| | | | array. DOH.
* Don't allow cmd_lookup_client to test clients without a session.nicm2009-10-141-2/+3
|
* Add a pipe-pane command to allow a pane to be piped to a shell command, fornicm2009-10-111-1/+2
| | | | | | | | | | | example: pipe-pane 'cat >~/out' No arguments stops outputing and closes the pipe; the -o flag toggles a pipe and on and off (useful for key bindings). Suggested by espie@.
* Split list-panes off from list-windows.nicm2009-10-101-1/+2
|
* Fix comment.nicm2009-10-071-2/+2
|
* Remove scroll mode which is now redundant, copy mode should be used instead.nicm2009-10-061-2/+1
| | | | The = key binding now does nothing.
* If no target client is specified to commands which accept one, try to guess thenicm2009-10-051-3/+50
| | | | | | current client, in a similar manner to how sessions already work: if the current session can be established and has only one client, use that; otherwise use the most recently created client.
* New lock-client and lock-session commands to lock an individual client or allnicm2009-09-241-1/+3
| | | | clients attached to a session respectively.
* Remove the internal tmux locking and instead detach each client and run thenicm2009-09-231-6/+1
| | | | | | | | | | | | | | command specified by a new option "lock-command" (by default "lock -np") in each client. This means each terminal has to be unlocked individually but simplifies the code and allows the system password to be used to unlock. Note that the set-password command is gone, so it will need to be removed from configuration files, and the -U command line flag has been removed. This is the third protocol version change so again it is best to stop the tmux server before upgrading.
* run-shell command to run a shell command without opening a window, sendingnicm2009-09-201-1/+2
| | | | stdout to output mode.
* Add a new display-panes command, with two options (display-panes-colour andnicm2009-08-311-1/+2
| | | | | display-panes-time), which displays a visual indication of the number of each pane.
* Add a choose-client command and extend choose-{session,window} to accept anicm2009-08-251-1/+43
| | | | | | | | | | | 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 ornicm2009-08-231-3/+3
| | | | NULL when curclient is also NULL, so just eliminate it.