Skip to content

feat: Windows terminal support - #55

Merged
mikew merged 9 commits into
mainfrom
windows-terminal
Aug 20, 2025
Merged

feat: Windows terminal support#55
mikew merged 9 commits into
mainfrom
windows-terminal

Conversation

@mikew

@mikew mikew commented Aug 19, 2025

Copy link
Copy Markdown
Owner

So they key here is start "" /WAIT nvim ..., but getting there is annoying.

We write a .bat file, because the user's shell might be git-bash which would need translating windows paths and cmd-style arguments. We still have to be aware of powershell and cmd, so that's all plumbed through, so powershell users on Linux should also be supported now.

Closes #54

Preview

Screen.Recording.2025-08-19.at.1.28.56.AM.mov

@mikew
mikew requested a review from Copilot August 20, 2025 03:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Windows terminal support to the nvrh tool by implementing special handling for Windows shells and creating batch file launchers. The key innovation is using start "" /WAIT nvim ... in batch files to properly handle Windows terminal behavior.

  • Refactors command string building to support different shell types (PowerShell, cmd, bat, bash)
  • Moves SSH arguments and other configuration from context to local variables for better separation of concerns
  • Adds Windows-specific launcher batch file creation and cleanup

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/nvrh_binary_ssh/main.go Moves SSH arguments from context to client struct
src/nvim_helpers/main.go Refactors command building with shell-specific support and new batch file handling
src/context/main.go Removes deprecated fields and adds Windows launcher path
src/client/main.go Implements Windows detection, batch file creation, and refactors variable scoping
src/bridge_files/lua/types/nvrh.lua Adds Windows launcher path type definition
src/bridge_files/lua/setup_nvim_launcher.lua New file for creating batch launcher files
src/bridge_files/lua/init_nvrh.lua Adds cleanup for Windows launcher files
src/bridge_files/lua/init_bridge.lua Updates function signature for Windows launcher path
script/test Minor test script adjustment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/nvim_helpers/main.go Outdated
Comment thread src/nvim_helpers/main.go
@mikew
mikew merged commit f57e8a5 into main Aug 20, 2025
3 checks passed
@mikew
mikew deleted the windows-terminal branch August 20, 2025 03:22
mikew pushed a commit that referenced this pull request Aug 20, 2025
🤖 I have created a release *beep* *boop*
---


## [0.3.0](v0.2.0...v0.3.0)
(2025-08-20)


### Features

* Determine server info ([#52](#52))
([27c802b](27c802b)),
closes [#11](#11)
* Windows terminal support
([#55](#55))
([f57e8a5](f57e8a5))


### Bug Fixes

* `client reconnect` command not getting server info
([#53](#53))
([2060a06](2060a06))
* `lua_files` -> `bridge_files` due to shell scripts
([#48](#48))
([92e4e92](92e4e92))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows terminal support

2 participants