Commit Graph

111 Commits

Author SHA1 Message Date
6249a4b866 Merge branch 'obsd-master' 2022-12-07 12:01:09 +00:00
7e497c7f23 Process escape sequences in show-buffer, GitHub issue 3401. 2022-12-07 09:44:44 +00:00
62036121fa Merge branch 'obsd-master' into master 2021-08-21 12:01:41 +01:00
08e6360f23 Add args parsing callback for some future work, currently unused. 2021-08-21 10:22:38 +00:00
b0da0cee4d Merge branch 'obsd-master' into master 2021-08-20 22:01:46 +01:00
5f32b7d961 Hide struct args behind a couple of accessor functions. 2021-08-20 19:50:16 +00:00
ce5de76592 Merge branch 'obsd-master' into master 2021-02-17 09:58:12 +00:00
79e1984962 O_TRUNC is needed in case file exists. 2021-02-11 09:03:38 +00:00
90de0c1a9b Merge branch 'obsd-master' 2020-07-21 08:01:19 +01:00
743ab5728d Fix show-buffer when run from inside tmux, GitHub issue 2314. 2020-07-21 05:24:33 +00:00
653a159225 Merge branch 'obsd-master' 2020-04-14 00:01:41 +01:00
3f7f9a0e20 Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a
session) or not.
2020-04-13 20:51:57 +00:00
8f2b5d714a Merge branch 'obsd-master' 2020-04-13 14:01:45 +01:00
04cdd03525 Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
2020-04-13 10:59:58 +00:00
b117c3b812 Merge branch 'obsd-master' 2020-04-13 10:30:00 +01:00
c20eb0c0ae Make struct cmd local to cmd.c and move it out of tmux.h. 2020-04-13 08:26:27 +00:00
7922f4ee7b Merge branch 'obsd-master' 2019-12-12 14:33:47 +00:00
c284ebe0ad Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.
2019-12-12 11:39:56 +00:00
a924694820 Use the right client when working out where to save or load the buffer,
reported by kn@.
2019-06-14 16:04:57 +01:00
f35f15b107 Use the right client when working out where to save or load the buffer,
reported by kn@.
2019-06-13 21:44:13 +00:00
400b807d75 Merge branch 'obsd-master' 2018-07-31 17:02:31 +01:00
5f07da6227 Do not leak path or use it after free. 2018-07-31 13:06:44 +00:00
711b8164bb Merge branch 'obsd-master' 2018-07-11 11:02:26 +01:00
cfc81692e6 Expand formats in load-buffer and save-buffer. 2018-07-11 08:29:21 +00:00
d8398af770 Merge branch 'obsd-master' 2017-04-22 08:01:54 +01:00
2c9bdd9e32 Memory leaks, from David CARLIER. 2017-04-22 06:13:30 +00:00
ba3c1534e0 Merge branch 'obsd-master' 2017-02-14 20:01:12 +00:00
e340df2034 Make source-file look for files relative to the client working directory
(like load-buffer and save-buffer), from Chris Pickel. Also break the
where-is-this-file code out into its own function for loadb and saveb.
2017-02-14 18:13:05 +00:00
a3428487a7 Merge branch 'obsd-master' 2017-01-06 14:01:15 +00:00
cae0fbbe8c Nits found with clang. 2017-01-06 13:26:09 +00:00
1a6e696b08 Merge branch 'obsd-master' 2016-10-16 22:01:14 +01:00
b342bd0b46 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
3d2686a236 Merge branch 'obsd-master' 2016-10-15 00:01:10 +01:00
ed971268be Add CMD_AFTERHOOK flag to the easy commands that don't need any special handling. 2016-10-14 22:14:22 +00:00
b9dc855016 Merge branch 'obsd-master'
Conflicts:
	format.c
	osdep-openbsd.c
2016-10-12 09:45:49 +01:00
a81685bfac Add static in cmd-* and fix a few other nits. 2016-10-10 21:51:39 +00:00
81f78f0da7 Merge branch 'obsd-master' 2016-03-05 10:01:09 +00:00
c38e0a4bbc Do not use c->cwd or s->cwd if it is NULL, found by Ben Boeckel. 2016-03-05 07:47:52 +00:00
5caec3020d Merge branch 'obsd-master' 2015-12-13 23:46:58 +00:00
ecfeee2e82 Use member names in cmd_entry definitions so I stop getting confused
about the order.
2015-12-13 21:53:57 +00:00
ae5ddfdc1a Merge branch 'obsd-master' 2015-12-13 16:01:13 +00:00
4a4daf1303 Instead of every command resolving the target (-t or -s) itself, prepare
the state (client, session, winlink, pane) for it it before entering the
command. Each command provides some flags that tell the prepare step
what it is expecting.

This is a requirement for having hooks on commands (for example, if you
hook "select-window -t1:2", the hook command should to operate on window
1:2 not whatever it thinks is the current window), and should allow some
other target improvements.

The old cmd_find_* functions remain for the moment but that layer will
be dropped later.

Joint work with Thomas Adam.
2015-12-13 14:32:38 +00:00
7b749eff35 Merge branch 'obsd-master'
Conflicts:
	server.c
	tmux.c
2015-11-14 11:38:30 +00:00
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
35fd6d134a Merge branch 'obsd-master'
Conflicts:
	utf8.c
2015-11-11 08:14:36 +00:00
6f3475c6c7 If realpath() fails just try the original path. 2015-11-10 22:33:47 +00:00
005e462e01 Handle absolute paths properly, and don't use resolved path in
realpath() fails.
2015-11-10 22:29:33 +00:00
17f6c3be8e Merge branch 'obsd-master' 2015-10-31 10:01:12 +00:00
01defc9f49 Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).
2015-10-31 08:13:58 +00:00
cb89f2f2a1 Merge branch 'obsd-master'
Conflicts:
	Makefile
	format.c
2015-08-30 21:44:01 +01:00