Conversation
|
Thank you for this. Is it possible to have the script within the strategy or does it need to be a separate file? |
|
No idea I'm afraid, I just copied the existing approach of calling AppleScript (which is only |
|
|
||
| function! test#strategy#ghostty(cmd) abort | ||
| let cmd = join(['cd ' . shellescape(getcwd()), s:pretty_command(a:cmd)], '; ') | ||
| call s:execute_script('osx_ghostty', cmd) |
There was a problem hiding this comment.
Would this only work for people on macOS or would it also work on Linux?
There was a problem hiding this comment.
Good question, Ghostty is available on both macOS and Linux https://ghostty.org/docs/install/binary and it looks like Windows support is in progress.
I use macOS and MacVim. I imagine the AppleScript-driven terminal/iterm strategies specifically mention MacVim because its users likely want to retain the app workflow with a separate editor app and a separate terminal app. I suppose if you run Vim within Ghostty there'd be an existing strategy that would allow you to shell out to the terminal or you could use an embedded terminal - but I don't know about that because I've only ever used vim-test with MacVim and the terminal strategy.
So I don't know if there'd be another need for a ghostty strategy that doesn't use AppleScript, but I don't think there's anything offensive about renaming it applescript_ghostty or something like that.
There was a problem hiding this comment.
I'd suggest renaming the script to macos_ghostty, wrapping the call in if has('mac') and updating the docs to make it clear this strategy only works on macOS
Make sure these boxes are checked before submitting your pull request:
Add fixtures and spec when implementing or updating a test runnerI don't see existing tests for the other AppleScript strategies...doc/test.txtAppleScript support was added to Ghostty in version 1.3.