Skip to content

macOS: fix command parsing in NewTerminalIntent - #12392

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:siri-shortcut
Apr 23, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:siri-shortcut

Conversation

@bo2themax

Copy link
Copy Markdown
Member

Fixes #12391, regression from #10765

@bo2themax
bo2themax requested a review from a team as a code owner April 23, 2026 09:31
@ghostty-bot ghostty-bot Bot added the os/macos label Apr 23, 2026
Fixes ghostty-org#12391, regression from ghostty-org#10765

Signed-off-by: Lukas <134181853+bo2themax@users.noreply.github.com>
@mitchellh mitchellh added this to the 1.3.2 milestone Apr 23, 2026
@mitchellh
mitchellh merged commit 7629c4b into ghostty-org:main Apr 23, 2026
90 checks passed
@bo2themax
bo2themax deleted the siri-shortcut branch April 23, 2026 13:43
calebhearth added a commit to calebhearth/dotfiles that referenced this pull request Sep 18, 2026
Ghostty 1.3 quotes the New Terminal intent's Command as a single shell
word before typing it into the login shell (Ghostty commit 1ff0dd8,
"macos: quote input strings used for shell commands", 2026-02-05). The
handler wrote the whole vim-dispatch wrapper line into the shortcut's
input file, so the shell saw one giant token, printed "command not
found", and exited. None of dispatch's temp files (`.pid`, `.complete`,
the output file) were written, so `:Copen` stayed empty. Upstream
reverted the quoting in April, but no tagged release has it yet.

Write the wrapper to an executable script at `<file>.dispatch` and hand
the shortcut only that path. A temp path has no shell-unsafe
characters, so it survives the quoting and also works once Ghostty ships
the fix. The shortcut itself is unchanged.

Also fix the start branch, which concatenated an undefined `command`
variable and threw E121 on every `:Start`, and drop the debug `echo`,
the unused `--output-path` file, and the `&shellredir` suffix left over
from the kitty handler.

Add a headless nvim regression test and a `make test` target. The
`g:dispatch_ghostty_launcher` variable exists so the test can capture
the input file instead of calling Shortcuts.

Related-to: ghostty-org/ghostty#12391
Related-to: ghostty-org/ghostty#12392
@mitchellh mitchellh modified the milestones: 1.3.2, 1.4.0 Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: Shortcuts "New Terminal" not working as expected with "Command" property

2 participants