Commit Graph

73 Commits (b65c72c45c79c3f1fea6446c83f6ac47e813a52a)

Author SHA1 Message Date
Thomas d02c4bda3a Merge branch 'obsd-master' 2014-01-20 10:48:12 +00:00
nicm 1286c56188 Replace ## by # in format. 2013-11-24 11:29:09 +00:00
Thomas Adam 334c28afe7 Fix previous
cwd is a char*, not a u_int.
2013-10-11 19:41:43 +01:00
Thomas Adam 5944230c50 Fix up missing cwd definition
This went walkies during the merge.
2013-10-11 19:38:40 +01:00
Nicholas Marriott 8bcdd8fc21 Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Conflicts:
	cmd-split-window.c
	cmd-unbind-key.c
	format.c
	osdep-openbsd.c
2013-10-11 16:52:39 +01:00
Thomas f703a30dfe Fixup osdep-* specific code
get_proc_name() is osdep_get_name() outside of OpenBSD.
2013-10-11 14:39:22 +01:00
Thomas 7f479ffdce Merge branch 'obsd-master' into mtemp 2013-10-11 14:33:29 +01:00
nicm 98b81e9834 And get it right this time... don't leak if it is an empty string either. 2013-10-11 08:03:43 +00:00
nicm 0b77d17b35 Fix leak in format_get_command. 2013-10-10 23:31:03 +00:00
nicm d0566a474a Remove the KERN_PROC_CWD the proc_current_path format (which is the only
thing that uses it now).
2013-10-10 12:39:24 +00:00
nicm 282c5f9644 Alter how tmux handles the working directory to internally use file
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-10 12:26:34 +00:00
nicm 1a49ebaa9f First period not last for host_short, from Michael Scholz. 2013-10-10 12:04:01 +00:00
nicm 2bf2f5d58e Allow nested format expansion. 2013-10-10 11:50:36 +00:00
nicm 40811eb8d4 Add length limit operator for formats. 2013-10-10 11:50:20 +00:00
nicm d75dd2ab1c Add formats for window flags. 2013-10-10 11:47:52 +00:00
Nicholas Marriott 4538c269d0 Alter how tmux handles the working directory to internally use file 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 '#{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-06 21:02:23 +01:00
Nicholas Marriott 884a21d0f5 First period not last for host_short, from Michael Scholz. 2013-10-01 23:24:39 +01:00
Nicholas Marriott 23519fc0b4 Add automatic-rename-format option allowing automatic rename to use something
other than pane_current_command.
2013-08-19 22:16:11 +01:00
Nicholas Marriott 04288fcd4c Allow nested format expansion. 2013-08-19 22:14:55 +01:00
Nicholas Marriott 84c22d053b Add length limit operator for formats. 2013-08-03 21:06:38 +01:00
Nicholas Marriott bcd9bcae2a Add formats for window flags. 2013-08-01 23:41:39 +01:00
Nicholas Marriott 939f796f08 Don't leak formats if they are added multiple times. 2013-08-01 23:40:44 +01:00
Nicholas Marriott 27364345bf Don't add client formats when they are NULL. 2013-08-01 23:39:09 +01:00
Thomas Adam bdea2f9eda Merge branch 'obsd-master' 2013-07-06 11:18:49 +01:00
Nicholas Marriott f5b041e394 Add pane_synchronized format, from Romain Francoise. 2013-07-05 15:27:14 +00:00
Thomas Adam 399d7380a5 Merge branch 'obsd-master' 2013-05-31 21:44:42 +01:00
Nicholas Marriott c30d60f7ae Add host_short format, from Tiago Cunha. 2013-05-31 19:46:42 +00:00
Thomas Adam cd60e57b6a Merge branch 'obsd-master'
Sync from OpenBSD.
2013-04-23 08:26:04 +01:00
Theo Deraadt 55640a31b3 (long long) and %lld for time_t output
ok nicm
2013-04-17 14:52:31 +00:00
Nicholas Marriott 87fe1c0b0e Include prefix on ids, from George Nachman. 2013-03-25 11:40:54 +00:00
Nicholas Marriott 6fee3e9e4b Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.
2013-03-25 10:11:45 +00:00
Nicholas Marriott 35452b3e55 Do not leak command in formats, from Romain Francoise. 2013-03-25 10:07:21 +00:00
Nicholas Marriott 20636d956d Add a command queue to standardize and simplify commands that call other
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-24 09:54:10 +00:00
Nicholas Marriott 86adcd4b26 Add pane_tabs format to format_window_pane based on code from George
Nachman.
2013-03-24 09:29:40 +00:00
Nicholas Marriott 702ab8bab0 Add a load of miscellaneous pane formats, from George Nachman. 2013-03-22 16:03:35 +00:00
Nicholas Marriott ad760b3bf7 Add client_session and client_last_session formats. 2013-03-22 10:32:36 +00:00
Nicholas Marriott 63b4fd5cac Add a format client_prefix which is 1 if prefix key has been
pressed, used for example #{?client_prefix,X,Y}. Also a few extra
server_client_status needed.
2013-03-21 16:14:09 +00:00
Nicholas Marriott 4d38b6d1fa Include prefix on ids, from George Nachman. 2013-03-13 07:28:12 +00:00
Nicholas Marriott f47a063841 Rename session idx to session id throughout and add $ prefix to targets to use
it, extended from a diff from George Nachman.
2013-03-07 10:07:22 +00:00
Nicholas Marriott f9e46a373f Do not leak command in formats, from Romain Francoise. 2013-03-05 20:01:16 +00:00
Nicholas Marriott 3964309c67 Add a command queue to standardize and simplify commands that call other
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-02-23 22:25:58 +00:00
Nicholas Marriott 5f904aa350 Add pane_tags format to format_window_pane based on code from George Nachman. 2013-02-23 13:02:52 +00:00
Nicholas Marriott 1db4ec6e63 Add pane_current_command format. 2013-02-22 16:25:21 +00:00
Nicholas Marriott 374dae6635 Add a load of miscellaneous pane formats, from George Nachman. 2013-02-21 19:44:27 +00:00
Nicholas Marriott d8261019f1 Add client_session and client_last_session formats. 2013-02-18 14:23:40 +00:00
Nicholas Marriott 06ac4b628d Add a format client_prefix which is 1 if prefix key has been pressed, used for
example #{?client_prefix,X,Y}. Also a few extra server_client_status needed.
2013-02-10 18:58:05 +00:00
Nicholas Marriott 6c53a1ed68 Allow formats in status options. 2013-02-10 18:53:25 +00:00
Thomas Adam 6d6e1581b5 Use osdep_get_cwd() for format change 2013-02-07 13:06:31 +00:00
Thomas Adam 64da762c15 Merge branch 'obsd-master' 2013-02-07 12:08:55 +00:00
Nicholas Marriott a5521597b0 Don't set some string formats if the string is NULL. 2013-02-05 11:01:45 +00:00