summaryrefslogtreecommitdiffstats
path: root/cmd.c
AgeCommit message (Collapse)Author
2012-07-11Make command exec functions return an enum rather than -1/0/1 values andNicholas Marriott
add a new value to mean "leave client running but don't attach" to fix problems with using some commands in a command sequence. Most of the work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-07-08Add choose-tree command to show windows and sessions in the sameNicholas Marriott
list. Change choose-window and -session to use the same code. From Thomas Adam.
2012-06-18Do not crash when the current session has no window, fixes a bugNicholas Marriott
reported by Giorgio Lando. Fix from Thomas Adam.
2012-04-23Do not return a buffer on the stack, mentioned by jsg a while ago.Nicholas Marriott
2012-04-22Fix printing commands with no arguments, from Benjamin Poirier.Nicholas Marriott
2012-03-03Add move-pane command (like join-pane but allows the same window). AlsoNicholas Marriott
-b flag to join-pane and move-pane to place the pane to the left or above. From George Nachman.
2012-02-06Don't die if fail to get root directory, from Ben Boeckel.Nicholas Marriott
2012-01-31Provide defined ways to set the various default-path possibilities: ~Nicholas Marriott
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
2012-01-30Give each window a unique id, like panes but prefixed with @. Based onNicholas Marriott
work from George Nachman.
2012-01-20Add some const and fix a warning.Nicholas Marriott
2011-12-27Allow $HOME as default-path in tmux.conf so the same config file can be usedStefan Sperling
on different machines regardless of where the user's home directory is. ok nicm
2011-12-09Change the way the working directory for new processes is discovered. IfNicholas Marriott
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.
2011-06-05Add a respawn-pane command, from Marcel Partap.Nicholas Marriott
2011-06-05Get rid of the layout string code which tries to walk through the layoutNicholas Marriott
hierarchy and instead just look at what panes are actually in the window.
2011-05-08Fix a memory leak if cmd_pane_session succeeds, from Tiago Cunha.Nicholas Marriott
2011-04-06Change so that an empty session name always means the current sessionsNicholas Marriott
even if given with, for example, -t '', and explicitly forbid empty session names and those containing a : when they are created.
2011-04-05Add a flag to cmd_find_session so that attach-session can preferNicholas Marriott
unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
2011-03-27Give each pane created in a tmux server a unique id (starting from 0),Nicholas Marriott
put it in the TMUX_PANE environment variable and accept it as a target. Suggested by and with testing and tweaks from Ben Boeckel.
2011-01-23Set $TMUX without the session when background jobs are run.Nicholas Marriott
2011-01-04Clean up and simplify tmux command argument parsing.Nicholas Marriott
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-30Change from a per-session stack of buffers to one global stack which isNicholas Marriott
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.
2010-12-21Store sessions in an RB tree by name rather than a list, this is tidierNicholas Marriott
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-10-29We now send argv to the server after parsing it in the client to get theNicholas Marriott
command, so the client should not modify it. Instead, take a copy. Fixes parsing command lists, reported by mcbride@.
2010-10-23Add a last-pane command (bound to ; by default). Requested ages ago byNicholas Marriott
somebody whose name I have forgotten.
2010-10-16Fall back on normal session choice method if $TMUX exists but is invalidNicholas Marriott
rather than rejecting.
2010-07-14Make pane/window wrapping more logical (so with 10 windows, +10 fromNicholas Marriott
window 5 stays in the same place), and tidy the code. From Tiago Cunha.
2010-06-21Add a choose-buffer command for easier use of the paste buffer stack.Nicholas Marriott
2010-06-21Extend the -t:+ and -t:- window targets for next and previous window toNicholas Marriott
accept an offset such as -t:+2. From Tiago Cunha.
2010-05-05Identical behaviour to select-prompt can now be obtained withNicholas Marriott
command-prompt, so remove select-prompt and change ' to be bound to command-prompt -p index "select-window -t :%%".
2010-03-22Support up, down, left, right movement through panes with -UDLR flags toNicholas Marriott
select-pane. Also REMOVE the up- and down-pane commands: equivalent behaviour is now available using -t :.+ and -t :.-.
2010-01-19Permit !, + and - to be used for window targets to specify last window (!), orNicholas Marriott
next and previous window by number (+ and -). Also tidy an if in cmd-new-window.c.
2010-01-07New command, join-pane, to split and move an existing pane into the space (likeNicholas Marriott
splitw then movep, or the reverse of breakp).
2009-12-08Permit panes to be referred to as "top", "bottom", "top-left" etc, if the rightNicholas Marriott
pane can be identified.
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-12-01New command, capture-pane, which copies the entire pane contents to a pasteNicholas Marriott
buffer. From Jonathan Alvarado.
2009-11-21Use home from struct passwd if HOME is empty as well as if it is NULL, and fixNicholas Marriott
a style nit. Both from Tiago Cunha.
2009-11-18Add a per-client log of status line messages displayed while that clientNicholas Marriott
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.
2009-11-03Add an activity time for clients, like for sessions, and change session andNicholas Marriott
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.
2009-11-03If it isn't available explicitly, work out the current client in a similar wayNicholas Marriott
to the current session - build a list of the possibilities then pick the newest.
2009-11-03Change session and client activity and creation time members to have moreNicholas Marriott
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.
2009-11-02When matching the session names with -t, look for exact matches first beforeNicholas Marriott
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.
2009-10-26tabs are better; ok nicmTheo Deraadt
2009-10-14cmd_find_client shouldn't die when there is an empty slot in the clientsNicholas Marriott
array. DOH.
2009-10-14Don't allow cmd_lookup_client to test clients without a session.Nicholas Marriott
2009-10-11Add a pipe-pane command to allow a pane to be piped to a shell command, forNicholas Marriott
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@.
2009-10-10Split list-panes off from list-windows.Nicholas Marriott
2009-10-07Fix comment.Nicholas Marriott
2009-10-06Remove scroll mode which is now redundant, copy mode should be used instead.Nicholas Marriott
The = key binding now does nothing.
2009-10-05If no target client is specified to commands which accept one, try to guess theNicholas Marriott
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.