Repository navigation
+edit-config fails when $VISUAL contains arguments #11895
Issue DescriptionI expect that setting (I might be wrong, but I feel like this was recently working in a previous version of Ghostty (tip).) Expected Behavior# .zshenv
export VISUAL="zed --new"Note to the above: IIRC, I think the long version of the flag was recently renamed from % ghostty +edit-configI would expect the above to start the Zed editor in a fresh workspace. % zed --version
Zed 0.229.0 – /Applications/Zed.app
% which zed
/usr/local/bin/zedNotes
Actual Behavior% ghostty +edit-config
Failed to execute the editor. Error code=error.FileNotFound.
This is usually due to the executable path not existing, invalid
permissions, or the shell environment not being set up
correctly.
Editor: zed --new
Path: /Users/username/Library/Application Support/com.mitchellh.ghostty/configReproduction Steps
Ghostty LogsGhostty VersionOS Version InformationmacOS Tahoe 26.3.1 (a) (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty Configuration<<default / empty>>Additional Relevant Configuration% zed --version
Zed 0.229.0 – /Applications/Zed.appI acknowledge that:
|
Replies: 4 comments 2 replies
|
I wrote up the above by hand. Now I'm asking Claude for its take. |
|
I discussed with Claude:
Here is its output... Analysis from Claude Opus 4.6 (Extended Thinking) The root cause is in This is not a shell. The fix is to split the editor string on whitespace before constructing argv. The first token becomes the executable for PATH resolution and This is the same approach used by Note: Workaround: Use a wrapper script that calls |
|
Based on the above, I renamed this issue to: "+edit-config fails when $VISUAL contains arguments" since this captures the underlying issue better. |
|
This is a duplicate of several other reports, but this has a good title/discussion so I'm using this to create the issue. |
This is a duplicate of several other reports, but this has a good title/discussion so I'm using this to create the issue.
#11897