<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ghostty.git/src/shell-integration, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/'/>
<entry>
<title>shell-integration: append $GHOSTTY_BIN_DIR to $PATH</title>
<updated>2025-10-01T14:42:33+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@indelible.org</email>
</author>
<published>2025-10-01T14:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=6f596ee7c353706d0bba4088eb43c31e4dd677b9'/>
<id>6f596ee7c353706d0bba4088eb43c31e4dd677b9</id>
<content type='text'>
For consistency with the termio/Exec.zig implementation, we always
append to the PATH (lowest priority).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For consistency with the termio/Exec.zig implementation, we always
append to the PATH (lowest priority).
</pre>
</div>
</content>
</entry>
<entry>
<title>shell-integration: remove redundant comments</title>
<updated>2025-10-01T14:27:42+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@indelible.org</email>
</author>
<published>2025-10-01T14:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=4989f92c719005b54cb17dfc20f76bbfbd946f5b'/>
<id>4989f92c719005b54cb17dfc20f76bbfbd946f5b</id>
<content type='text'>
I think the conditions are sufficiently self-descriptive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think the conditions are sufficiently self-descriptive.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: cleaned up elvish and fish integrations for bin_dir</title>
<updated>2025-10-01T04:26:07+00:00</updated>
<author>
<name>Matthew Hrehirchuk</name>
<email>matthew_hre@outlook.com</email>
</author>
<published>2025-10-01T04:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=9407e0fd0d7bc7243b5eaf04658a591cd77e41a3'/>
<id>9407e0fd0d7bc7243b5eaf04658a591cd77e41a3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: add GHOSTTY_BIN_DIR to path via shell integration</title>
<updated>2025-09-30T17:26:20+00:00</updated>
<author>
<name>Matthew Hrehirchuk</name>
<email>matthew_hre@outlook.com</email>
</author>
<published>2025-09-30T17:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=4cc663fc6003aa6626d4a9c73f1763b862dc569f'/>
<id>4cc663fc6003aa6626d4a9c73f1763b862dc569f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mark ssh shell-integration wrapper as a function this matches other features + fixes a case where users alias  to some other command</title>
<updated>2025-09-16T02:49:48+00:00</updated>
<author>
<name>rhodes-b</name>
<email>59537185+rhodes-b@users.noreply.github.com</email>
</author>
<published>2025-09-16T02:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=1397c762434ea9a0852a1bbcc046360658b79321'/>
<id>1397c762434ea9a0852a1bbcc046360658b79321</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>zsh: clarify that an unset ZDOTDIR defaults to HOME</title>
<updated>2025-08-19T14:41:47+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@indelible.org</email>
</author>
<published>2025-08-19T14:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=8300512a9118b7757958b95703914998b5111f9b'/>
<id>8300512a9118b7757958b95703914998b5111f9b</id>
<content type='text'>
This fixes the incorrect comment and uses $HOME (rather than ~) to be a
little bit more explicit.

Also, our script is named ghostty-integration, not ghostty.zsh, so
update that part of the comment, too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the incorrect comment and uses $HOME (rather than ~) to be a
little bit more explicit.

Also, our script is named ghostty-integration, not ghostty.zsh, so
update that part of the comment, too.
</pre>
</div>
</content>
</entry>
<entry>
<title>zsh: unset _ghostty_file in the early exit path</title>
<updated>2025-08-19T14:36:26+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@indelible.org</email>
</author>
<published>2025-08-19T14:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=e8a60a375c2902caa4727aafa3cc61345f4085a3'/>
<id>e8a60a375c2902caa4727aafa3cc61345f4085a3</id>
<content type='text'>
If we're running a too-old version of zsh, we exit early. This skipped
the _ghostty_file cleanup path below.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we're running a too-old version of zsh, we exit early. This skipped
the _ghostty_file cleanup path below.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix fish shell syntax for ssh-env shell integration</title>
<updated>2025-08-04T10:28:39+00:00</updated>
<author>
<name>Robbie Vanbrabant</name>
<email>robbie.vanbrabant@gmail.com</email>
</author>
<published>2025-08-04T10:28:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=42e4a95b64c48b051eaaa61c975b07ffafc1edc6'/>
<id>42e4a95b64c48b051eaaa61c975b07ffafc1edc6</id>
<content type='text'>
As discussed here https://github.com/ghostty-org/ghostty/discussions/8021

This fixes invalid fish shell syntax.

As an example, run ghostty like so: `XDG_CONFIG_HOME=/tmp ghostty --shell-integration-features=ssh-env --command="/usr/bin/env fish"`. Setting XDG_CONFIG_HOME to /tmp is just to start from the default config.

Before:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)&gt; ssh git@github.com
env: ‘command’: No such file or directory
robbiev@neo ~/s/ghostty (fish-shell-ssh) [127]&gt;
```

After:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)&gt; ssh git@github.com
PTY allocation request failed on channel 0
Hi robbiev! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
robbiev@neo ~/s/ghostty (fish-shell-ssh) [1]&gt;
```

My understanding of the fix follows.

The script is using `command` to make sure it calls the actual ssh binary and not some intermediate shell function with the same name (`man command` explains).

`env` can be useful for fish compat &lt; 3.1, where [the KEY=value syntax was introduced](https://fishshell.com/docs/current/faq.html#how-do-i-set-or-clear-an-environment-variable). However because `command` is a builtin it doesn't work in this case.

So a simple solution is this, requiring fish &gt;= 3.1

```
TERM="$ssh_term" command ssh $ssh_opts $argv
```

An [alternative](https://serverfault.com/questions/164305/how-can-i-set-environment-variable-for-just-one-command-in-fish-shell) for maximum fish compat could be the following:

```
begin
  set -lx TERM "$ssh_term"
  command ssh $ssh_opts $argv
end
```

According to `man set`, `-l` means local to the block and `-x` means export.

I'm in favour of keeping `command` as it makes the integration more predicable.

The reason I went with the current fix:
- It's easier to understand without knowing fish shell.
- [kat found that fish 3.1 should be widely available](https://github.com/ghostty-org/ghostty/discussions/8021#discussioncomment-13877129).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As discussed here https://github.com/ghostty-org/ghostty/discussions/8021

This fixes invalid fish shell syntax.

As an example, run ghostty like so: `XDG_CONFIG_HOME=/tmp ghostty --shell-integration-features=ssh-env --command="/usr/bin/env fish"`. Setting XDG_CONFIG_HOME to /tmp is just to start from the default config.

Before:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)&gt; ssh git@github.com
env: ‘command’: No such file or directory
robbiev@neo ~/s/ghostty (fish-shell-ssh) [127]&gt;
```

After:

```
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
robbiev@neo ~/s/ghostty (fish-shell-ssh)&gt; ssh git@github.com
PTY allocation request failed on channel 0
Hi robbiev! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
robbiev@neo ~/s/ghostty (fish-shell-ssh) [1]&gt;
```

My understanding of the fix follows.

The script is using `command` to make sure it calls the actual ssh binary and not some intermediate shell function with the same name (`man command` explains).

`env` can be useful for fish compat &lt; 3.1, where [the KEY=value syntax was introduced](https://fishshell.com/docs/current/faq.html#how-do-i-set-or-clear-an-environment-variable). However because `command` is a builtin it doesn't work in this case.

So a simple solution is this, requiring fish &gt;= 3.1

```
TERM="$ssh_term" command ssh $ssh_opts $argv
```

An [alternative](https://serverfault.com/questions/164305/how-can-i-set-environment-variable-for-just-one-command-in-fish-shell) for maximum fish compat could be the following:

```
begin
  set -lx TERM "$ssh_term"
  command ssh $ssh_opts $argv
end
```

According to `man set`, `-l` means local to the block and `-x` means export.

I'm in favour of keeping `command` as it makes the integration more predicable.

The reason I went with the current fix:
- It's easier to understand without knowing fish shell.
- [kat found that fish 3.1 should be widely available](https://github.com/ghostty-org/ghostty/discussions/8021#discussioncomment-13877129).
</pre>
</div>
</content>
</entry>
<entry>
<title>bash: upgrade to bash-preexec 0.6.0</title>
<updated>2025-08-03T13:15:35+00:00</updated>
<author>
<name>Jon Parise</name>
<email>jon@indelible.org</email>
</author>
<published>2025-08-03T13:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=f4e434fffd23a94dee702f7961b42ac5f4922fd4'/>
<id>f4e434fffd23a94dee702f7961b42ac5f4922fd4</id>
<content type='text'>
https://github.com/rcaloras/bash-preexec/releases/tag/0.6.0

This is a small update for us because we've been using a patched version
of this script in Ghostty for some time, and the 0.6.0 release includes
most of the local changes we made as part of maintaining and improving
our bash shell integration.

- https://github.com/rcaloras/bash-preexec/pull/167
- https://github.com/rcaloras/bash-preexec/pull/170

We continue to maintain one local HISTCONTROL-related modification
(#2478). There are a few upstream conversations related to HISTCONTROL
that might eliminate the need for this local patch, so we may revisit
that in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rcaloras/bash-preexec/releases/tag/0.6.0

This is a small update for us because we've been using a patched version
of this script in Ghostty for some time, and the 0.6.0 release includes
most of the local changes we made as part of maintaining and improving
our bash shell integration.

- https://github.com/rcaloras/bash-preexec/pull/167
- https://github.com/rcaloras/bash-preexec/pull/170

We continue to maintain one local HISTCONTROL-related modification
(#2478). There are a few upstream conversations related to HISTCONTROL
that might eliminate the need for this local patch, so we may revisit
that in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary stderr redirection in fish integration</title>
<updated>2025-07-19T08:52:55+00:00</updated>
<author>
<name>HuaDeity</name>
<email>hello@huadeity.com</email>
</author>
<published>2025-07-19T08:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/ghostty.git/commit/?id=d8c64c05112a8d15fa591e11cb29957f974b44a4'/>
<id>d8c64c05112a8d15fa591e11cb29957f974b44a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
