Thomas Adam
5489796737
Merge branch 'obsd-master'
2019-04-27 20:09:07 +01:00
nicm
dfb7bb6830
Merge hooks into options and make each one an array option. This allows
...
multiple commands to be easily bound to one hook. set-hook and
show-hooks remain but they are now variants of set-option and
show-options. show-options now has a -H flag to show hooks (by default
they are not shown).
2019-04-26 11:38:51 +00:00
Thomas Adam
2977317243
Merge branch 'obsd-master'
2018-11-22 12:02:38 +00:00
nicm
3a7b9d5735
Do not use PWD unless it actually matches the real working directory.
2018-11-22 10:36:40 +00:00
Thomas Adam
84ddc72744
Merge branch 'obsd-master'
2018-01-17 11:26:10 +00:00
nicm
f32fd2df69
Improve error message if creating socket parent directory fails, from
...
Thomas Adam for GitHub issue 1215.
2018-01-12 10:22:02 +00:00
Thomas Adam
06684c93de
Merge branch 'obsd-master'
2018-01-01 12:01:13 +00:00
nicm
d17c90583a
Prefer PWD for current directory if present in client, from Wei Zhao in
...
GitHub issue 1183.
2018-01-01 11:19:08 +00:00
Thomas Adam
1076a2e26c
Merge branch 'obsd-master'
...
Conflicts:
cmd-pipe-pane.c
proc.c
tmux.c
window.c
2017-07-12 13:43:08 +01:00
nicm
ed3cfaafb2
Make shell_command a global like other stuff rather than making it an
...
exception and using callback argument.
2017-07-12 09:21:25 +00:00
Thomas Adam
4e01036cb6
Merge branch 'obsd-master'
2017-07-03 10:01:14 +01:00
nicm
42285ac989
Try C.UTF-8 which is also a commonly useful locale on some platforms,
...
from Romain Francoise.
2017-07-03 08:08:30 +00:00
nicm
ae1a6c2fc5
Do not need getopt.h.
2017-04-22 12:08:41 +00:00
Thomas Adam
93062ad099
Fix after merge
2017-04-21 09:29:22 +01:00
Thomas Adam
22e594fcea
Merge branch 'obsd-master'
...
Conflicts:
Makefile.am
pty.c
2017-04-21 09:25:07 +01:00
Nicholas Marriott
b723f50e65
Do not need getopt.h for getopt, from Eric N Vander Weele.
2017-04-20 20:35:11 +01:00
nicm
87997efe8d
Use fdforkpty() instead of our own unwrapped versions.
2017-04-20 17:49:26 +00:00
Thomas Adam
5a551ac57f
Merge branch 'obsd-master'
2017-04-19 16:01:14 +01:00
nicm
689f4bfac2
Style nits and a missing cast.
2017-04-19 12:44:29 +00:00
Thomas Adam
d912687be7
Merge branch 'obsd-master'
2017-04-16 22:01:19 +01:00
nicm
d566c780e5
Memory leak, from David CARLIER.
2017-04-16 20:33:46 +00:00
Thomas Adam
02ddd4ce70
Merge branch 'obsd-master'
2017-03-21 20:01:16 +00:00
nicm
04e17a7e11
Use uid_t for UID not u_int.
2017-03-21 19:28:03 +00:00
Nicholas Marriott
514a723f74
Solaris fixes, mostly from Dagobert Michelsen.
2017-03-09 15:39:13 +00:00
Thomas Adam
f734d81074
Merge branch 'obsd-master'
2017-02-16 12:01:21 +00:00
nicm
8b8d0963da
Style nits.
2017-02-16 10:53:25 +00:00
Nicholas Marriott
a3d5bfcece
Define away pledge() on !OpenBSD.
2017-01-23 12:27:58 +00:00
Thomas Adam
b3a724f30c
Merge branch 'obsd-master'
...
Conflicts:
Makefile
tmux.c
2017-01-23 12:20:43 +00:00
nicm
98e7fbb2ac
Open /dev/ptm before pledge() and save it to be used for PTMGET later
...
(this means inlining forkpty()).
ok deraadt
2017-01-23 10:09:43 +00:00
Thomas Adam
c9fcb76651
Merge branch 'obsd-master'
2017-01-15 22:01:11 +00:00
nicm
2b0bc9f1c5
Major tidy up and rework of options tree and set-option/show-options
...
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.
2017-01-15 20:48:41 +00:00
Thomas Adam
d4cb178249
Merge branch 'obsd-master'
2017-01-12 16:01:13 +00:00
nicm
24cba5907b
Simplify appending to string options.
2017-01-12 15:36:35 +00:00
Thomas Adam
a64b7cfe5d
Merge branch 'obsd-master'
2016-12-10 00:01:11 +00:00
nicm
bee95bf378
Spacing nits.
2016-12-09 21:39:27 +00:00
Thomas Adam
b9dc855016
Merge branch 'obsd-master'
...
Conflicts:
format.c
osdep-openbsd.c
2016-10-12 09:45:49 +01:00
nicm
e45401846f
Add static in window-*.c and move some internal functions out of tmux.h.
2016-10-11 13:21:59 +00:00
nicm
c426e485e5
Loads more static, except for cmd-*.c and window-*.c.
2016-10-10 21:29:23 +00:00
Nicholas Marriott
5e9412608e
No longer set __progname, we have getprogname().
2016-05-30 10:02:08 +01:00
Thomas Adam
c10d83b4df
__progname -> getprogname()
...
Fix fallout from recent use of getprogname(), which deprecates __progname.
2016-05-27 20:11:32 +01:00
Thomas Adam
a2e0db67cc
Merge branch 'obsd-master'
2016-05-27 20:01:11 +01:00
nicm
fcb00a4161
Use getprogname() instead of __progname to make portability easier.
2016-05-27 17:05:42 +00:00
Nicholas Marriott
7411f21c5f
Use osdep_event_init() so that LIBEVENT_NOEPOLL and so on are set to turn off
...
broken event methods. Reported by Suraj N Kurapati.
2016-05-20 07:54:30 +01:00
Thomas Adam
f4648c1ca1
Merge branch 'obsd-master'
2016-05-05 00:01:11 +01:00
nicm
9f045787a5
Fix up a couple of long lines.
2016-05-04 21:29:47 +00:00
Thomas Adam
5fc5c03dad
Merge branch 'obsd-master'
...
Conflicts:
tmux.c
2016-03-05 17:58:12 +00:00
nicm
0d6de44a37
If setlocale("en_US.UTF-8") succeeds, then don't do the check for UTF-8
...
locale since if it isn't UTF-8 the system is broken anyway. If it fails,
try "" and check for UTF-8 with nl_langinfo(CODESET) rather than
wcwidth(). Based on a diff from schwarze@, nl_langinfo also suggested by
stsp@.
2016-03-05 16:08:38 +00:00
Thomas Adam
81f78f0da7
Merge branch 'obsd-master'
2016-03-05 10:01:09 +00:00
nicm
1f0b317088
Although we always have en_US.UTF-8 on OpenBSD, some platforms do not,
...
so fall back to setlocale(LC_CTYPE, ""). tmux requires a UTF-8 locale,
so check with wcwidth() on a UTF-8 character after setlocale().
2016-03-05 07:44:31 +00:00
Thomas Adam
e304673c65
Merge branch 'obsd-master'
...
Conflicts:
utf8.c
2016-03-02 18:10:51 +00:00
nicm
e647eeb0c9
Remove unused variables, from Michal Mazurek.
2016-03-01 12:02:54 +00:00
nicm
26945d7956
Use system wcwidth() instead of carrying around UTF-8 width tables.
2016-03-01 12:02:08 +00:00
Nicholas Marriott
fc864529f5
Remove malloc_options debug bit (already gone from OpenBSD).
2016-02-19 13:11:10 +00:00
Thomas Adam
dc42c35f1f
Merge branch 'obsd-master'
2016-01-19 18:01:15 +00:00
nicm
995af0e2b7
I no longer use my SourceForge address so replace it.
2016-01-19 15:59:12 +00:00
Thomas Adam
5862f59ed7
Conflicts:
...
Makefile
2015-12-08 07:11:09 +00:00
nicm
d2fb0efcd1
Add hooks infrastructure, basic commands (set-hook, show-hooks) and a
...
couple of not very useful client hooks. This will eventually let
commands be run at various points and on notifications. Joint work with
Thomas Adam.
2015-12-08 01:10:31 +00:00
Thomas Adam
890d8da2e3
Merge branch 'obsd-master'
...
Conflicts:
log.c
proc.c
tmux.c
2015-11-25 16:37:30 +00:00
nicm
62d3af17f9
Make environ_set va_args and use it to tidy up some calls. Also add a
...
missing word in manpage (from jmc).
2015-11-24 23:46:15 +00:00
nicm
3ff46b2e43
Shell command from -c doesn't have to be global, pass it as an argument.
2015-11-24 23:22:51 +00:00
nicm
c913fb99b6
Tidy the code that works out the socket path, and just use the full path
...
in the global socket_path rather than copying it.
2015-11-24 22:27:22 +00:00
nicm
8976dac9e0
Remove malloc_options DEBUG bit.
2015-11-24 22:09:53 +00:00
nicm
1e2df2d464
Remove the -I part of show-messages which isn't really that useful; the
...
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')
2015-11-24 21:52:06 +00:00
nicm
9cccb8c115
Make the log stuff a bit tidier with some helper functions.
2015-11-24 21:19:46 +00:00
Thomas Adam
d63de1e407
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-23 21:20:54 +00:00
nicm
01a2ddf3f8
Add getpw to pledge, makes tmux work in YP environments, discovered by
...
matthieu, ok deraadt
2015-11-22 19:41:19 +00:00
Thomas Adam
78a00c845c
Merge branch 'obsd-master'
...
Conflicts:
tmux.h
2015-11-21 14:24:33 +00:00
nicm
fce56c56ef
Instead of separate tables for different types of options, give each
...
option a scope type (server, session, window) in one table.
2015-11-20 12:01:19 +00:00
Thomas Adam
8213558cc7
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-15 22:49:25 +00:00
nicm
a582b62287
Accidentally turned off pledge, turn it back on.
2015-11-15 14:32:48 +00:00
Thomas Adam
7b749eff35
Merge branch 'obsd-master'
...
Conflicts:
server.c
tmux.c
2015-11-14 11:38:30 +00:00
nicm
c56b81a2ce
Push stdout and stderr to clients more aggressively, and add an event to
...
continue if the send fails.
2015-11-14 09:41:06 +00:00
Thomas Adam
5f483499f3
Merge branch 'obsd-master'
2015-11-12 12:01:17 +00:00
nicm
0cc812ae34
tmux is UTF-8, so if $TMUX is set (tmux running in tmux), the client is
...
UTF-8. Also try to make the existing checks more readable.
2015-11-12 11:24:08 +00:00
nicm
1b86f520ea
Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
...
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).
2015-11-12 11:09:11 +00:00
Thomas Adam
f2e4aa8d1c
Merge branch 'obsd-master'
2015-11-12 00:01:10 +00:00
nicm
00c34df186
Drop mouse-utf8 option and always turn on UTF-8 mouse if the client says
...
it supports UTF-8.
2015-11-11 23:23:33 +00:00
Thomas Adam
a5e4d3a2d8
Merge branch 'obsd-master'
2015-10-28 12:01:11 +00:00
nicm
bf9c933cae
Like options, move the environ struct into environ.c.
2015-10-28 09:51:55 +00:00
Thomas Adam
da1f6fc2c8
Merge branch 'obsd-master'
...
Conflicts:
Makefile
client.c
server-client.c
server.c
tmux.c
tmux.h
2015-10-27 23:27:26 +00:00
nicm
44657bf932
Move struct options into options.c.
2015-10-27 15:58:42 +00:00
nicm
07b0ea03c3
Break the common process set up, event loop and imsg dispatch code
...
between server and client out into a separate internal API. This will
make it easier to add another process.
2015-10-27 13:23:24 +00:00
Thomas Adam
91f53d590b
__OpenBSD__ around pledge()
2015-10-25 09:31:07 +00:00
Thomas Adam
3e0d31c4e9
Merge branch 'obsd-master'
2015-10-25 09:22:20 +00:00
Thomas Adam
4acc8d0ff5
Merge branch 'obsd-master'
...
Conflicts:
cmd-find.c
2015-10-25 09:21:37 +00:00
deraadt
3034a71488
Let's see if anyone screams about not being able to specify $TMPDIR
...
for their tmux sockets.
(Over the years, I have seen $TMPDIR set up worse than /tmp many times,
and don't know how this practice infected other parts of the system.
Nothing uses tmpdir(3), nor a huge-temporary-file program like sort.)
ok nicm
2015-10-25 07:48:16 +00:00
nicm
5383b047d1
tmux can call pledge() in main with large set and then reduce it
...
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd
proc exec tty ps".
2015-10-23 16:07:29 +00:00
Nicholas Marriott
c06c14fb29
Some header fixes.
2015-10-15 21:42:17 +01:00
Thomas Adam
d47789620b
Add missing <time.h>
2015-09-14 14:39:51 +01:00
Thomas Adam
4afe26fa82
Merge branch 'obsd-master'
2015-09-14 14:01:09 +01:00
nicm
216ddf3da5
Move tzset() from log_open to main.
2015-09-14 12:12:24 +00:00
Nicholas Marriott
79e5b62907
osdep_event_init not event_init.
2015-09-10 12:41:49 +01:00
Thomas Adam
76688d2040
Merge branch 'obsd-master'
...
Conflicts:
cfg.c
tmux.c
2015-09-06 20:47:50 +01:00
nicm
82326dcbe2
A couple of style nits.
2015-09-03 14:30:23 +00:00
nicm
952ba84611
Work out config file when needed not at startup.
2015-09-01 10:10:59 +00:00
nicm
6a539c00df
Path from $TMUX does not need to be global anymore.
2015-08-30 22:56:36 +00:00
nicm
c6e9160c67
Login shell can be a client flag, and move the exec code into client.c.
2015-08-30 22:40:25 +00:00
nicm
dd92b6e83d
Event base does not need to be global.
2015-08-30 22:19:07 +00:00
Thomas Adam
cb89f2f2a1
Merge branch 'obsd-master'
...
Conflicts:
Makefile
format.c
2015-08-30 21:44:01 +01:00
nicm
b87dc608d9
Some style nits and dead assignments.
2015-08-30 15:43:40 +00:00