Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: add env config option #5309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcollie
Copy link
Collaborator

@jcollie jcollie commented Jan 22, 2025

Fixes #5257

Specify environment variables to pass to commands launched in a terminal surface. The format is env=KEY=VALUE.

env = foo=bar
env = bar=baz

Setting env to an empty string will reset the entire map to default (empty).

env =

Setting a key to an empty string will remove that particular key and corresponding value from the map.

env = foo=bar
env = foo=

will result in foo not being passed to the launched commands. Setting a key multiple times will overwrite previous entries.

env = foo=bar
env = foo=baz

will result in foo=baz being passed to the launched commands.

These environment variables will not be passed to commands run by Ghostty for other purposes, like open or xdg-open used to open URLs in your browser.

Fixes ghostty-org#5257

Specify environment variables to pass to commands launched in a terminal
surface. The format is `env=KEY=VALUE`.

`env = foo=bar`
`env = bar=baz`

Setting `env` to an empty string will reset the entire map to default
(empty).

`env =`

Setting a key to an empty string will remove that particular key and
corresponding value from the map.

`env = foo=bar`
`env = foo=`

will result in `foo` not being passed to the launched commands.
Setting a key multiple times will overwrite previous entries.

`env = foo=bar`
`env = foo=baz`

will result in `foo=baz` being passed to the launched commands.

These environment variables _will not_ be passed to commands run by Ghostty
for other purposes, like `open` or `xdg-open` used to open URLs in your
browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add env configuration to specify environment variables to launch command with
1 participant