Commit Graph

7902 Commits

Author SHA1 Message Date
Nicholas Marriott 26682256b3 OS X CMSG_FIRSTHDR is broken. 2009-09-02 12:30:56 +00:00
Nicholas Marriott 61b7dc522d Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.
2009-09-02 06:33:20 +00:00
Tiago Cunha 5838ee1263 Sync OpenBSD patchset 306:
If forking a login shell or if SHELL is otherwise not useful, set it to the
default shell. Based on a diff from martynas@.
2009-09-02 01:08:32 +00:00
Tiago Cunha b7cb7d10f9 Update. 2009-09-02 01:06:30 +00:00
Tiago Cunha 521659db4b Adjust OpenBSD patchset 305 to the portable version. 2009-09-02 01:05:55 +00:00
Tiago Cunha a3a150faf2 Sync OpenBSD patchset 305:
When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.

The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.

Based on a diff from martynas@, changed by me to be a session option rather
than a window option.
2009-09-02 01:02:44 +00:00
Tiago Cunha ce5c441f0f Sync OpenBSD patchset 304:
Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.
2009-09-02 00:55:49 +00:00
Tiago Cunha 99de03ea32 Sync OpenBSD patchset 303:
Sort cases same as getopt argument, from martynas.
2009-09-02 00:54:00 +00:00
Nicholas Marriott c089e19020 If forking a login shell or if SHELL is otherwise not useful, set it to the
default shell. Based on a diff from martynas@.
2009-09-01 14:40:33 +00:00
Nicholas Marriott 7d5e494716 When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.

The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.

Based on a diff from martynas@, changed by me to be a session option rather
than a window option.
2009-09-01 13:09:49 +00:00
Nicholas Marriott f8aa5821be Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.
2009-09-01 09:11:05 +00:00
Nicholas Marriott 34bb735a65 Sort cases same as getopt argument, from martynas. 2009-09-01 09:00:54 +00:00
Tiago Cunha d463eddb8b Update. 2009-08-31 22:31:44 +00:00
Tiago Cunha ed3535db8a Sync OpenBSD patchset 302:
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 22:30:15 +00:00
Tiago Cunha 2fe369831c Sync OpenBSD patchset 301:
squash typo
2009-08-31 22:25:33 +00:00
Tiago Cunha 86fb9737dc Sync OpenBSD patchset 300:
Don't call tty_free unless the client is a terminal, otherwise tty_init hasn't
been called and it may end up doing close(0). From Kalle Olavi Niemitalo.
2009-08-31 22:24:18 +00:00
Nicholas Marriott 04319964b9 Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 20:46:19 +00:00
Stefan Sperling 8102ec3be5 squash typo
ok nicm@
2009-08-31 11:52:32 +00:00
Nicholas Marriott 71ede76c68 Don't call tty_free unless the client is a terminal, otherwise tty_init hasn't
been called and it may end up doing close(0). From Kalle Olavi Niemitalo.
2009-08-31 11:37:27 +00:00
Tiago Cunha d15e88cb68 Sync OpenBSD patchset 299:
Initialise the arg2 pointer properly (also free it when freeing the
others). Fixes crashes with J in malloc_options reported by oga.
2009-08-26 22:13:52 +00:00
Tiago Cunha 83e44c7d8e Sync OpenBSD patchset 298:
Make this work when the clock is in small characters as well. Doh.
2009-08-26 22:12:21 +00:00
Tiago Cunha fde3bda453 Sync OpenBSD patchset 297:
Fix clock mode in black and white terminals now that tty.c tries to fix
reverse.
2009-08-26 22:11:00 +00:00
Nicholas Marriott 2e5b3ab8bc Initialise the arg2 pointer properly (also free it when freeing the
others). Fixes crashes with J in malloc_options reported by oga.
2009-08-26 18:09:52 +00:00
Nicholas Marriott ddf97f8289 Make this work when the clock is in small characters as well. Doh. 2009-08-26 16:23:30 +00:00
Nicholas Marriott 1ba5ce9cb3 Fix clock mode in black and white terminals now that tty.c tries to fix
reverse.
2009-08-26 16:16:06 +00:00
Nicholas Marriott 1a5aba47c7 ttydefchars is a fucking horlicks. Happily we only need it in one file, move it
in there to avoid multiple inclusion issues.

Perhaps it would be better to pass NULL through to forkpty in the default
case...
2009-08-26 09:10:47 +00:00
Nicholas Marriott 6b4ed722b1 FreeBSD and NetBSD HAVE got ttydefaults.h. Fixes SF bug 2844744.
Also make clang use -iquote in makefiles.
2009-08-26 08:58:39 +00:00
Tiago Cunha 1ce325b31e Sync OpenBSD patchset 296:
Print -l and -p when showing command, pointed out by Tiago Cunha.
2009-08-25 16:52:42 +00:00
Tiago Cunha f5d38f2696 Update. 2009-08-25 16:50:34 +00:00
Nicholas Marriott f949107a32 Print -l and -p when showing command, pointed out by Tiago Cunha. 2009-08-25 14:53:22 +00:00
Tiago Cunha bd5b011ecd Include <ctype.h>. 2009-08-25 13:55:29 +00:00
Tiago Cunha 8fd77cbb5b Sync OpenBSD patchset 294:
Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.

The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).
2009-08-25 13:53:39 +00:00
Nicholas Marriott be16f79438 These should #include <ctype.h>. 2009-08-25 13:32:14 +00:00
Tiago Cunha c1653ff654 Sync OpenBSD patchset 293:
gcc2 doesn't understand attributes on function pointers.
2009-08-25 13:11:24 +00:00
Nicholas Marriott 22b2b7c6c5 Done. 2009-08-25 12:24:45 +00:00
Nicholas Marriott 7b847ced4a Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.

The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).
2009-08-25 12:18:51 +00:00
Tiago Cunha d5bc78d98b Sync OpenBSD patchset 292:
Add some other obvious variables to update-environment (WINDOWID SSH_ASKPASS
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION) so they are updated in the session
environment on new/attach.
2009-08-24 16:35:24 +00:00
Tiago Cunha a3799e0350 Sync OpenBSD patchset 291:
Some code tidying.
2009-08-24 16:31:26 +00:00
Tiago Cunha 35b926c445 Sync OpenBSD patchset 290:
When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
2009-08-24 16:27:03 +00:00
Tiago Cunha 2e2e762743 Sync OpenBSD patchset 289:
The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.
2009-08-24 16:24:18 +00:00
Nicholas Marriott 4f1d81c4ce gcc2 doesn't understand attributes on function pointers. 2009-08-24 08:03:11 +00:00
Nicholas Marriott 90400ae96a Add some other obvious variables to update-environment (WINDOWID SSH_ASKPASS
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION) so they are updated in the session
environment on new/attach.
2009-08-23 18:21:02 +00:00
Nicholas Marriott a910b38a35 Some code tidying. 2009-08-23 17:37:48 +00:00
Nicholas Marriott c7394ac4e0 When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
2009-08-23 17:29:51 +00:00
Nicholas Marriott 43cd40e87a The cursession member in struct cmd_ctx is always either curclient->session or
NULL when curclient is also NULL, so just eliminate it.
2009-08-23 16:45:00 +00:00
Nicholas Marriott 266c13df18 Check the return value of strunvis against -1 not NULL. 2009-08-23 11:50:39 +00:00
Nicholas Marriott 1eb303e6d4 Check the return value of strunvis against -1 not NULL. 2009-08-23 11:40:05 +00:00
Tiago Cunha 633e74ef80 Sync OpenBSD patchset 287:
Emulate dch/dch1 if missing by redrawing the entire line.
2009-08-21 21:15:00 +00:00
Tiago Cunha 1fa8a8f4a6 Sync OpenBSD patchset 285:
Ugh, committed the wrong version of this change and got both solutions rather
than just the second. Remove unused assignment.
2009-08-21 21:13:20 +00:00
Tiago Cunha d07d18258b Sync OpenBSD patchset 284:
When moving up or down in copy mode, save the cursor position and size of the
last line with content (width != 0) and use it to determine if the cursor
should be at the end of the line. Fixes problem of the cursor always jumping to
the end of the line when scrolling past a blank line.
2009-08-21 21:12:07 +00:00