Files
neovim/runtime/doc
Justin M. Keyes a94647bb08 backport: build(windows): restore "tee" on Windows #36627
build(windows): restore "tee" on Windows

Problem:
Neovim no longer ships with a tee binary on Windows, which breaks
functionality for the :grep and :make commands.

    nvim --clean
    :grep foo or :make
    "tee is not recognized as an internal or external command"

Solution:
Include a simple, no-dependency tee.c source file in the src/ directory.
Update CMakeLists.txt to build a tee executable alongside neovim during
the build process, and ensure the tee.exe program appears alongside the
neovim executable in the bin/ directory so that it is accessible for
:grep and :make.

tee.c was obtained from the vim codebase:
https://github.com/vim/vim/blob/master/src/tee/tee.c

And we modified it to fix performance issues.

Testing:

    nvim --clean
    :grep foo or :make, after setting a file to the makeprg option.
    Verify that :grep results and error output from a compiler appear in the message pane.

ref https://github.com/neovim/neovim/issues/32431
fix https://github.com/neovim/neovim/issues/32504

Other tee options:
- [tee-win32](https://github.com/dEajL3kA/tee-win32): MIT. However,
  I couldn't get it to build on my machine even after updating its
  makefile to call my install of MSVC. It's also super optimized and
  uses some processor intrinsics for multithreading.
- [gnu coreutils tee](https://gnuwin32.sourceforge.net/packages/coreutils.htm):
  (Windows coreutils contains a tee.c. Last updated 2005. Did not build
  immediately on my machine; we'd have to determine which definitions
  from elsewhere in coreutils tee.c needs and incorporate them somehow.
- [WinTee](https://github.com/mpderbec/WinTee): Has no license. Last
  updated 11 years ago. Relies on Visual Studio to build.

Co-authored-by: friendlyman23 <ams5661@gmail.com>
2025-11-19 17:03:42 -08:00
..
2025-09-08 02:49:21 +00:00
2023-07-25 05:07:13 -07:00
2025-09-08 02:49:21 +00:00
2025-01-01 12:29:51 -08:00
2025-03-18 06:18:37 -07:00
2024-10-23 14:13:42 +02:00
2024-05-15 23:19:26 +02:00
2025-04-30 15:51:38 +02:00
2025-09-08 02:49:21 +00:00
2021-09-10 08:48:27 +02:00
2023-06-25 17:14:28 +02:00
2023-10-29 16:02:32 +08:00
2025-03-26 05:49:48 -07:00
2025-05-03 23:07:06 +00:00
2025-03-17 12:31:53 +01:00
2023-05-13 21:33:22 +02:00
2025-09-08 02:49:21 +00:00
2025-09-08 02:49:21 +00:00
2025-04-30 15:51:38 +02:00
2025-02-17 10:33:20 +08:00
2025-04-27 23:00:36 +00:00
2022-10-14 08:01:13 -07:00
2025-03-17 12:31:53 +01:00
2025-06-01 23:16:54 +00:00
2024-11-21 06:50:30 +08:00
2023-11-06 19:03:08 +08:00
2025-05-03 23:07:06 +00:00
2025-03-17 12:31:53 +01:00
2024-01-18 00:14:48 -08:00
2024-04-30 04:30:21 -07:00
2025-03-02 14:27:52 -08:00
2023-01-01 15:05:13 +01:00
2023-06-19 08:40:33 -07:00
2025-03-15 15:00:44 +01:00
2025-04-27 23:00:36 +00:00
2025-02-15 14:55:25 +01:00
2025-03-15 15:00:44 +01:00
2025-05-03 23:07:06 +00:00
2025-03-18 06:18:37 -07:00
2023-08-10 17:28:02 +08:00
2025-01-03 08:29:36 -08:00
2025-03-17 12:31:53 +01:00
2025-07-22 23:15:21 +00:00
2023-04-23 15:22:55 +02:00
2023-01-03 10:07:43 +00:00
2023-06-25 17:14:28 +02:00
2023-06-19 08:40:33 -07:00
2023-06-25 17:14:28 +02:00
2023-06-25 17:14:28 +02:00
2021-05-01 22:29:03 -04:00
2023-06-25 17:14:28 +02:00
2018-10-29 10:01:44 +01:00
2021-04-29 09:27:19 -04:00
2023-06-25 17:14:28 +02:00
2024-04-30 05:54:03 +08:00
2021-04-29 20:42:16 -04:00
2023-06-26 11:29:12 +02:00
2023-07-25 05:07:13 -07:00
2021-04-27 09:21:34 -04:00
2023-06-19 08:40:33 -07:00
2025-05-03 23:07:06 +00:00
2023-06-25 17:14:28 +02:00
2025-03-18 06:18:37 -07:00
2025-05-03 23:07:06 +00:00