Instant Terminal Sharing
Go to file
Nicholas Marriott f308ba93aa Change the way the working directory for new processes is discovered. If
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-12-09 16:28:18 +00:00
arguments.c Pass the right size to calloc (* not **). 2011-07-09 01:36:42 +00:00
array.h Shut up gcc4 warnings. 2010-06-05 16:32:22 +00:00
attributes.c Accept (and document) "none" instead of "default" for attributes as it 2010-05-14 18:56:21 +00:00
cfg.c Support \ for line continuation in the configuration file, from Julius 2011-08-24 10:46:01 +00:00
client.c Add a -P option to detach to HUP the client's parent process (usually 2011-03-03 08:51:47 +00:00
clock.c Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last 2009-12-03 22:50:09 +00:00
cmd-attach-session.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-bind-key.c Fix bind-key -t. 2011-01-15 20:14:41 +00:00
cmd-break-pane.c Reset last pane properly when using break-pane as well, fixes a problem 2011-05-08 21:30:00 +00:00
cmd-capture-pane.c Another memory leak from Tiago Cunha. 2011-08-30 09:20:17 +00:00
cmd-choose-buffer.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-choose-client.c Add a -r flag to switch-client to toggle the client read-only flag. From 2011-08-16 10:00:52 +00:00
cmd-choose-session.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-choose-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-clear-history.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-clock-mode.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-command-prompt.c Make confirm-before prompt customizable with -p option like 2011-07-08 06:37:57 +00:00
cmd-confirm-before.c Make confirm-before prompt customizable with -p option like 2011-07-08 06:37:57 +00:00
cmd-copy-mode.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-delete-buffer.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-detach-client.c -s comes before -t and also add -s to command syntax. Prompted by jmc. 2011-04-11 16:44:36 +00:00
cmd-display-message.c Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0' 2011-04-06 11:36:26 +00:00
cmd-display-panes.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-find-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-has-session.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-if-shell.c Didn't really think the else behaviour through - requiring argv to 2011-10-27 22:40:15 +00:00
cmd-join-pane.c While here, maximum percentage is 100 not INT_MAX. Oops. 2011-01-23 15:49:10 +00:00
cmd-kill-pane.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-kill-server.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-kill-session.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-kill-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-link-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-list-buffers.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-list-clients.c Add client formats, from Ben Boeckel. 2011-10-23 01:12:46 +00:00
cmd-list-commands.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-list-keys.c flags[] should be initialized. From Thomas Adam. 2011-07-08 15:18:20 +00:00
cmd-list-panes.c Add a pane_index format string and use it, from Ben Boeckel. 2011-11-15 23:21:52 +00:00
cmd-list-sessions.c Add initial framework for more powerful formatting of command output and 2011-08-26 10:53:16 +00:00
cmd-list-windows.c Fix typo: ) -> }. 2011-09-23 12:23:24 +00:00
cmd-list.c We now send argv to the server after parsing it in the client to get the 2010-10-29 20:11:57 +00:00
cmd-load-buffer.c Try to resolve relative paths for loadb and saveb (first using client 2011-10-23 08:34:01 +00:00
cmd-lock-server.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-move-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-new-session.c For initial session, use size of command client even if detached. 2011-10-23 08:10:11 +00:00
cmd-new-window.c Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
cmd-paste-buffer.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-pipe-pane.c Missing -o on usage for pipe-pane, from Tiago Cunha. 2011-10-27 22:41:03 +00:00
cmd-refresh-client.c Add -S option to refresh-client to redraw status line, from Marco Beck. 2011-09-28 20:11:21 +00:00
cmd-rename-session.c Change so that an empty session name always means the current sessions 2011-04-06 21:51:31 +00:00
cmd-rename-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-resize-pane.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-respawn-pane.c Make window_pane_index work the same as window_index, from Ben Boeckel. 2011-11-15 23:19:51 +00:00
cmd-respawn-window.c Use screen_reinit for respawn-pane to keep history and call input_init 2011-07-04 13:35:37 +00:00
cmd-rotate-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-run-shell.c Simplify the way jobs work and drop the persist type, so all jobs are 2011-01-26 01:54:56 +00:00
cmd-save-buffer.c Try to resolve relative paths for loadb and saveb (first using client 2011-10-23 08:34:01 +00:00
cmd-select-layout.c Now that parsing is common, merge some of the small, related commands 2011-01-04 02:03:41 +00:00
cmd-select-pane.c Redraw pane borders when switching to last pane. 2011-01-31 20:54:42 +00:00
cmd-select-window.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-send-keys.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-send-prefix.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-server-info.c POSIX only guarantees uname() will return a non-negative value on 2011-04-19 20:12:47 +00:00
cmd-set-buffer.c Plug a memory leak and update some comments, from Tiago Cunha. 2011-10-23 00:49:25 +00:00
cmd-set-environment.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-set-option.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-show-buffer.c Plug a memory leak and update some comments, from Tiago Cunha. 2011-10-23 00:49:25 +00:00
cmd-show-environment.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-show-messages.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-show-options.c Add a flag to cmd_find_session so that attach-session can prefer 2011-04-05 19:37:01 +00:00
cmd-source-file.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-split-window.c Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
cmd-start-server.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-string.c Read ${X} environment variables in strings and $HOME from the global 2010-12-13 22:53:14 +00:00
cmd-suspend-client.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-swap-pane.c Reset last pane on swap-pane across windows, fixes crash noticed by hsim 2011-05-08 21:12:52 +00:00
cmd-swap-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd-switch-client.c Add a -r flag to switch-client to toggle the client read-only flag. From 2011-08-16 10:00:52 +00:00
cmd-unbind-key.c Use key_bindings_remove for unbind-key -a to allow it to work from key 2011-08-16 09:37:48 +00:00
cmd-unlink-window.c Clean up and simplify tmux command argument parsing. 2011-01-04 00:42:46 +00:00
cmd.c Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
colour.c There is no need to use sqrt()/INFINITY here which simplifies the code 2011-08-22 10:14:15 +00:00
environ.c Run job commands explicitly in the global enviroment (which can be 2010-04-04 19:02:09 +00:00
format.c Add a pane_index format string and use it, from Ben Boeckel. 2011-11-15 23:21:52 +00:00
grid-utf8.c Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last 2009-12-03 22:50:09 +00:00
grid-view.c When clearing the entire screen, clear lines that are used into the 2011-01-25 23:40:26 +00:00
grid.c Merge copy mode and output mode, dropping the latter. Idea and code from 2010-04-06 21:35:44 +00:00
input-keys.c Extend the mode-mouse option to add a third choice which means the mouse 2011-07-30 18:01:26 +00:00
input.c Support for \e[3J to clear the history. Also send the corresponding 2011-10-23 10:16:14 +00:00
job.c Simplify the way jobs work and drop the persist type, so all jobs are 2011-01-26 01:54:56 +00:00
key-bindings.c Include the existing window and session name in the prompt when renaming 2011-07-03 18:18:15 +00:00
key-string.c Alias NPage/PPage as PageDown/PgDn/PageUp/PgUp to reduce occasional 2011-10-23 10:19:26 +00:00
layout-custom.c Get rid of the layout string code which tries to walk through the layout 2011-06-05 10:53:05 +00:00
layout-set.c Fix a trivial copy-and-paste error (sx->sy), from Chris Johnsen. 2011-11-09 12:02:07 +00:00
layout.c Add a new option, mouse-resize-pane. When on, panes may be resized by 2011-05-08 20:34:12 +00:00
log.c Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last 2009-12-03 22:50:09 +00:00
Makefile Add initial framework for more powerful formatting of command output and 2011-08-26 10:53:16 +00:00
mode-key.c Support "jump to" like vi in copy mode using t and T keys. Also add x 2011-12-04 16:18:01 +00:00
names.c Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last 2009-12-03 22:50:09 +00:00
options-table.c Move word-separators to be a session rather than window option, from Ben 2011-11-15 23:24:04 +00:00
options.c Permit multiple prefix keys to be defined, separated by commas, for example: 2009-09-22 12:38:10 +00:00
paste.c Style: uint -> u_int and a missing else. 2011-03-28 19:44:31 +00:00
procname.c Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
resize.c Store sessions in an RB tree by name rather than a list, this is tidier 2010-12-21 22:37:59 +00:00
screen-redraw.c Make window_pane_index work the same as window_index, from Ben Boeckel. 2011-11-15 23:19:51 +00:00
screen-write.c Support for \e[3J to clear the history. Also send the corresponding 2011-10-23 10:16:14 +00:00
screen.c Support DECSCUSR sequence to set the cursor style with two new 2011-05-20 19:17:39 +00:00
server-client.c Fix a couple of memory leaks, from marcel partap. 2011-08-20 20:37:30 +00:00
server-fn.c Support for \e[3J to clear the history. Also send the corresponding 2011-10-23 10:16:14 +00:00
server-window.c Add a tty_bell wrapper function, from Dylan Alex Simon. 2011-08-24 09:58:44 +00:00
server.c Give each pane created in a tmux server a unique id (starting from 0), 2011-03-27 20:27:26 +00:00
session.c Correctly skip existing numbers when generating the name for a new 2011-08-16 09:36:23 +00:00
signal.c Do not call event_del() for signals after fork(), just use sigaction() 2010-08-19 18:29:01 +00:00
status.c Make M-f and M-b work the same at the command prompt as in copy mode, 2011-12-01 20:42:31 +00:00
tmux.1 Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
tmux.c Try to resolve relative paths for loadb and saveb (first using client 2011-10-23 08:34:01 +00:00
tmux.h Change the way the working directory for new processes is discovered. If 2011-12-09 16:28:18 +00:00
tty-acs.c Use UTF-8 line drawing characters on UTF-8 terminals. Fixes some stupid 2010-09-11 16:19:22 +00:00
tty-keys.c Two fixes by Micah Cowan: make mouse work properly beyond >127 on signed 2011-03-04 23:26:44 +00:00
tty-term.c Log terminal overrides. 2011-12-01 23:47:08 +00:00
tty.c Add a tty_bell wrapper function, from Dylan Alex Simon. 2011-08-24 09:58:44 +00:00
utf8.c Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262 2011-01-03 23:35:21 +00:00
window-choose.c Support all four of the xterm mouse modes. Based on a diff from hsim at 2010-12-29 21:49:06 +00:00
window-clock.c Pass in the session, rather than the client, to window modes' key() 2010-05-23 19:42:19 +00:00
window-copy.c Support "jump to" like vi in copy mode using t and T keys. Also add x 2011-12-04 16:18:01 +00:00
window.c Make window_pane_index work the same as window_index, from Ben Boeckel. 2011-11-15 23:19:51 +00:00
xmalloc.c tabs are better; ok nicm 2009-10-26 21:42:04 +00:00
xterm-keys.c Add a couple of extra xterm-style keys that gnome terminal provides, 2011-06-23 10:02:49 +00:00