Skip to content

cli: +edit-config works properly when editor command contains arguments - #11898

Merged
mitchellh merged 2 commits into
ghostty-org:mainfrom
jcollie:edit-config-parameters
Mar 28, 2026
Merged

mitchellh merged 2 commits into
ghostty-org:mainfrom
jcollie:edit-config-parameters

Conversation

@jcollie

@jcollie jcollie commented Mar 27, 2026

Copy link
Copy Markdown
Member

If $EDITOR or $VISUAL contained arguments, not just the path to an editor (e.g. zed --new) +edit-config would fail because we were treating the whole command as a path. Instead, wrap the command with /bin/sh -c <command> so that the shell can separate the path from the arguments.

Fixes #11897

If `$EDITOR` or `$VISUAL` contained arguments, not just the path to
an editor (e.g. `zed --new`) `+edit-config` would fail because we were
treating the whole command as a path. Instead, wrap the command with
`/bin/sh -c <command>` so that the shell can separate the path from
the arguments.

Fixes ghostty-org#11897
@ghostty-bot ghostty-bot Bot added the cli `ghostty` command-line interface label Mar 27, 2026
@jcollie jcollie added this to the 1.3.2 milestone Mar 27, 2026
@jcollie

jcollie commented Mar 27, 2026

Copy link
Copy Markdown
Member Author

This was apparently fixed once before in #8901 but that must have only been applied to 1.2.x and not to 1.3.x.

@mitchellh
mitchellh merged commit 608bc7d into ghostty-org:main Mar 28, 2026
83 checks passed
@jcollie
jcollie deleted the edit-config-parameters branch March 28, 2026 20:24
@eproxus

eproxus commented Oct 2, 2026

Copy link
Copy Markdown

Any chance this could get released soon? It's broken with Zed (zed —wait) since more than half a year.

@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

cli `ghostty` command-line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

+edit-config fails when $VISUAL contains arguments

3 participants