feat: Windows terminal support - #55
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So they key here is
start "" /WAIT nvim ..., but getting there is annoying.We write a
.batfile, 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