summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
AgeCommit message (Collapse)Author
2015-10-31Fall back silently to ~ or / rather than checking -c with access(), thisnicm
was the old behaviour.
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsnicm
around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
2015-10-28Like options, move the environ struct into environ.c.nicm
2015-10-27Move struct options into options.c.nicm
2015-10-27Break the common process set up, event loop and imsg dispatch codenicm
between server and client out into a separate internal API. This will make it easier to add another process.
2015-10-23Remove some unnecessary checks before free().nicm
2015-09-10Add session_last_attached time and format, from Sina Siadat.nicm
2015-08-28Make session_update_activity more useful and use it in more places.nicm
2015-08-28Run status update on a per-client timer at status-interval.nicm
2015-06-07Add -E flag when attaching or switching client to bypassnicm
update-environment, from Steven Lu.
2015-06-04Move the nested check from client to server and compare the client ttynicm
name to all the pane pty names instead of comparing socket paths. This means that "new -d" will work without unsetting $TMUX.
2015-05-29Use RB_MIN to get the lowest index for the current window when creatingnicm
grouped sessions, rather than using RB_ROOT.
2015-04-27Rewrite of the target resolution internals to be simpler and morenicm
consistent but with much less duplication, but keeping the same internal API. Also adds more readable aliases for some of the special tokens used in targets (eg "{start}" instead of "^"). Some behaviours may have changed, for example prefix matches now happen before fnmatch.
2015-02-05Wrap all the individual format_* calls in a single format_defaultsnicm
functions.
2014-10-20Move template defines back into .c files.nicm
2014-10-20Instead of setting up the default keys by building the key structnicm
directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
2014-05-13If multiple arguments are given to new-session, new-window,nicm
split-window, respawn-window or respawn-pane, pass them directly to execvp() to help avoid quoting problems. One argument still goes to "sh -c" like before. Requested by many over the years. Patch from J Raynor.
2014-04-17Set PATH explicitly, either from client or sessionnicm
environment. Previously it came from the session environment. From J Raynor.
2014-04-17Remove some unnecessary includes and fix a typo.nicm
2014-02-23Change terminal-overrides to a server option (now that we have them), itnicm
doesn't make much sense as a session option.
2013-11-22Handle empty current directory more gracefully.nicm
2013-10-10Don't boke when figuring out working directory from configuration file.nicm
2013-10-10Alter how tmux handles the working directory to internally use filenicm
descriptors rather than strings. - Each session still has a current working directory. - New sessions still get their working directory from the client that created them or its attached session if any. - New windows are created by default in the session working directory. - The -c flag to new, neww, splitw allows the working directory to be overridden. - The -c flag to attach let's the session working directory be changed. - The default-path option has been removed. To get the equivalent to default-path '.', do: bind c neww -c $PWD To get the equivalent of default-path '~', do: bind c neww -c ~ This also changes the client identify protocol to be a set of messages rather than one as well as some other changes that should make it easier to make backwards-compatible protocol changes in future.
2013-10-10Remove CMD_SENDENVIRON.nicm
2013-03-25Add -P and -F to new-session.Nicholas Marriott
2013-03-24Add -A flag to new-session to make it behave like attach-session if theNicholas Marriott
session exists. If -A is used, -D behaves like -d to attach-session.
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
2012-12-09Use the CMD_*_USAGE defines consistently, from Thomas Adam.Nicholas Marriott
2012-11-19Use a utility function for common code to show errors in config file,Nicholas Marriott
from Thomas Adam.
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-05-22Add a helper function to send ready message.Nicholas Marriott
2012-05-06Add a helper function to open the terminal for attach-/new-session.Nicholas Marriott
2012-03-17Add notify hooks for various events, the functions are currently emptyNicholas Marriott
stubs but will be filled in for control mode later. From George Nachman.
2012-02-02Move window name changes into wrapper function window_set_name, fromNicholas Marriott
George Nachman.
2011-10-23For initial session, use size of command client even if detached.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-02-03Don't require -d with -x or -y since it could be in the config file.Nicholas Marriott
2011-01-14Support -x and -y for new-session to specify the initial size of theNicholas Marriott
window if created detached with -d.
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.
2011-01-01Don't reset the activity timer for unattached sessions every second,Nicholas Marriott
this screws up the choice of most-recently-used. Instead, break the time update into a little function and do it when the session is attached. Pointed out by joshe@.
2010-12-20Use pointer rather than index for the client's last session.Nicholas Marriott
2010-12-11Track the last session for a client and add a flag to switch-client andNicholas Marriott
a key binding (L) to move a client back to its last session.
2010-06-27Store the current working directory in the session, change the default-pathNicholas Marriott
option to default to empty and make that mean that the stored session CWD is used.
2010-04-06Merge copy mode and output mode, dropping the latter. Idea and code fromNicholas Marriott
Micah Cowan.
2010-02-22Display -t argument to new-session, from Tiago Cunha.Nicholas Marriott
2010-02-06Use the array.h code for the causes list.Nicholas Marriott
2010-02-06Instead of bailing out on the first configuration file error, carry on,Nicholas Marriott
collecting all the errors, then start with the active window in more mode displaying them.
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...