summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
AgeCommit message (Collapse)Author
2014-01-20Merge branch 'obsd-master'Thomas
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-10-06Don't boke when figuring out working directory from configuration file.Nicholas Marriott
2013-10-06Alter how tmux handles the working directory to internally use file descriptorsNicholas Marriott
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 '#{pane_current_path}' The equivalent of default-path '~' is left as an exercise for the reader. 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-06Remove CMD_SENDENVIRON.Nicholas Marriott
2013-10-01Support -c for new-session, based on code from J Raynor.Nicholas Marriott
2013-08-21Remove the barely-used and unnecessary command check() function.Nicholas Marriott
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.
2013-03-22Add -P and -F to new-session.Nicholas Marriott
2013-02-24Add -A flag to new-session to make it behave like attach-session if the sessionNicholas Marriott
exists. If -A is used, -D behaves like -d to attach-session.
2013-02-23Add 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-31Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD.
2012-12-09Use the CMD_*_USAGE defines consistently, from Thomas Adam.Nicholas Marriott
2012-11-22Merge branch 'obsd-master'Thomas Adam
Sync from OpenBSD. * obsd-master: Add halfpage commands to mode command string table (missed by accident), from Thomas Adam. Clarify some points about config files, notably that they are only read at server start. From Thomas Adam. Use a utility function for common code to show errors in config file, from Thomas Adam.
2012-11-19Use a utility function for common code to show errors in config file,Nicholas Marriott
from Thomas Adam.
2012-07-11Sync OpenBSD patchset 1151:Tiago Cunha
Make command exec functions return an enum rather than -1/0/1 values and 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-11Sync OpenBSD patchset 1150:Tiago Cunha
xfree is not particularly helpful, remove it. 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-22Sync OpenBSD patchset 1118:Tiago Cunha
Add a helper function to send ready message.
2012-05-22Add a helper function to send ready message.Nicholas Marriott
2012-05-12Sync OpenBSD patchset 1111:Tiago Cunha
Add a helper function to open the terminal for attach-/new-session.
2012-05-06Add a helper function to open the terminal for attach-/new-session.Nicholas Marriott
2012-03-18Sync OpenBSD patchset 1069:Tiago Cunha
Add notify hooks for various events, the functions are currently empty stubs but will be filled in for control mode later. From George Nachman.
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-02Sync OpenBSD patchset 1024:Tiago Cunha
Move window name changes into wrapper function window_set_name, from George Nachman.
2012-02-02Move window name changes into wrapper function window_set_name, fromNicholas Marriott
George Nachman.
2011-10-23Sync OpenBSD patchset 967:Tiago Cunha
For initial session, use size of command client even if detached.
2011-10-23For initial session, use size of command client even if detached.Nicholas Marriott
2011-07-09Expand the Id keyword. Tiago Cunha
2011-04-06|PatchSet 884Nicholas Marriott
|Date: 2011/04/06 22:51:31 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Change so that an empty session name always means the current sessions |even if given with, for example, -t '', and explicitly forbid empty |session names and those containing a : when they are created.
2011-04-06|PatchSet 882Nicholas Marriott
|Date: 2011/04/05 20:37:01 |Author: nicm |Branch: HEAD |Tag: (none) |Log: |Add a flag to cmd_find_session so that attach-session can prefer |unattached sessions when choosing the most recently used (if -t is not |given). Suggested by claudio@.
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-15Sync OpenBSD patchset 861:Tiago Cunha
Don't require -d with -x or -y since it could be in the config file.
2011-02-03Don't require -d with -x or -y since it could be in the config file.Nicholas Marriott
2011-01-21Sync OpenBSD patchset 844:Tiago Cunha
Support -x and -y for new-session to specify the initial size of the window if created detached with -d.
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-07Sync OpenBSD patchset 829:Tiago Cunha
Clean up and simplify tmux command argument parsing. 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-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-03Sync OpenBSD patchset 819:Tiago Cunha
Don't reset the activity timer for unattached sessions every second, 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@.
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-22Sync OpenBSD patchset 802:Tiago Cunha
Use pointer rather than index for the client's last session.
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.