Commit Graph

14447 Commits

Author SHA1 Message Date
Mitchell Hashimoto
3c074b5aec renderer: only compute and draw preedit cells if they change
Fixes #10424
Replaces #10431

The issue is that when the row where preedit was wasn't dirty, we were
layering more preedit cells (identical ones) on top, so it'd appear to
get "thicker".
2026-02-16 14:23:44 -08:00
github-actions[bot]
bdcee2b05a Update VOUCHED list (#10770)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10769) from
@jcollie.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 22:13:22 +00:00
Mitchell Hashimoto
7895bf1d02 shell-integration: respect cursor-style-blink (#10643)
The `cursor` shell feature always used a blinking bar (beam), often to
the surprise of users who set `cursor-style-blink = false`.

This change extends our GHOSTTY_SHELL_FEATURES format to include either
`cursor:blink` (default) or `cursor:steady` based on cursor-style-blink
when the `cursor` feature is enabled, and all shell integrations have
been updated to use that additional information to choose the DECSCUSR
cursor value (5=blinking bar, 6=steady bar).

I also considered passing a DECSCUSR value in GHOSTTY_SHELL_FEATURES
(e.g. `cursor:5`). This mostly worked well, but zsh also needs the blink
state on its own for its block cursor. We also don't support any other
shell feature cursor configurability (e.g. the shape), so this was an
over generalization.

This does change the behavior for users who like the blinking bar in the
shell but have `cursor-blink-style = false` for other reasons. We could
provide additional `cursor` shell feature configurability (e.g.
`cursor:blink` in `shell-integration-features`), but I'll propose that
as its own change.

See: #2812
Closes: #8681

---

**AI Disclosure:** I did a lot of rubber ducking with Claude Code while
trying out various ideas. It was particularly useful for this kind of
feature because I could try out one thing and have it evaluate the
impact on all of the shell integration scripts at once.
2026-02-16 14:08:23 -08:00
Mitchell Hashimoto
f79906c7b8 osc: parse OSC 5522 - Kitty clipboard protocol (#10560)
This PR only adds support for parsing the OSCs. No support has been
added to DECRQM/DECRPM/DECSET/DECRST for mode 5522.

Related to #10549
2026-02-16 14:06:43 -08:00
Mitchell Hashimoto
65c9208c08 zsh: update PS1 substitution to include 'cl=line' (#10768)
Our PS1 cleanup code (where we remove any markers we added) was still
looking for the previous 133;A form. Update it to include 'cl=line',
which was added in 8595558.
2026-02-16 13:59:59 -08:00
Jon Parise
e5e063c89d zsh: update PS1 substitution to include 'cl=line'
Our PS1 cleanup code (where we remove any markers we added) was still
looking for the previous 133;A form. Update it to include 'cl=line',
which was added in 8595558.
2026-02-16 16:49:03 -05:00
Mitchell Hashimoto
b358705b65 macos: rename shellQuoted() to Ghostty.Shell.quote() (#10765)
We already had an established Ghostty.Shell namespace (previously a
struct; now a more idiomatic enum), and locating these functions next to
each other makes it clearer how they relate to one another.
2026-02-16 12:40:13 -08:00
Mitchell Hashimoto
d1774e1423 macos: sort INFOPLIST_KEY_ names (#10764)
Xcode wants these to be sorted and will update this list when the
project file is saved so proactively make this change before it gets
mixed up in other work.
2026-02-16 12:31:33 -08:00
Jon Parise
df6feba417 macos: rename shellQuoted() to Ghostty.Shell.quote()
We already had an established Ghostty.Shell namespace (previously a
struct; now a more idiomatic enum), and locating these functions next to
each other makes it clearer how they relate to one another.
2026-02-16 15:27:57 -05:00
Jon Parise
d49ac65b16 macos: sort INFOPLIST_KEY_ names
Xcode wants these to be sorted and will update this list when the
project file is saved so proactively make this change before it gets
mixed up in other work.
2026-02-16 15:25:53 -05:00
Mitchell Hashimoto
dc3a25c2a3 ci: update vouch to 1.3.1
For GH API retries
2026-02-16 12:13:47 -08:00
github-actions[bot]
534f1190af Update VOUCHED list (#10763)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10694#issuecomment-3910186875)
from @jcollie.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 19:16:57 +00:00
Mitchell Hashimoto
99e342717b fix: copy_title_to_clipboard respects user-overridden title (#10694)
## Summary
- Fixes #10345 — `copy_title_to_clipboard` now copies the user-set
custom title instead of the raw terminal title
- Adds a new `copy_title` apprt action as [suggested by
@mitchellh](https://github.com/ghostty-org/ghostty/issues/10345#issuecomment-2601002974)
- Each platform (GTK + macOS) resolves the effective title (user
override → terminal title fallback) before copying to clipboard

## Changes
- **`src/apprt/action.zig`** — New `copy_title` void action
- **`include/ghostty.h`** — C ABI enum entry
- **`src/Surface.zig`** — Binding handler now dispatches apprt action
instead of inline logic
- **`src/apprt/gtk/class/surface.zig`** — `getEffectiveTitle()` helper
(returns `title_override orelse title`)
- **`src/apprt/gtk/class/application.zig`** — GTK action handler
- **`macos/.../Ghostty.App.swift`** — macOS handler using
`surfaceView.title` + `NSPasteboard`

*Note*: This PR was *AI* assisted.
2026-02-16 11:10:17 -08:00
github-actions[bot]
39c4a406f7 Update VOUCHED list (#10761)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10599) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:59:50 +00:00
github-actions[bot]
c8edac93eb Update VOUCHED list (#10759)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10600) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:58:20 +00:00
github-actions[bot]
bc4314b882 Update VOUCHED list (#10757)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10606) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:56:37 +00:00
Mitchell Hashimoto
d993c700af bash: remove redundant out-of-band OSC 133;A (#10747)
The printf was part of the original script (9d6121245), and at the time,
this was the only place we'd emit the 133;A mark.

A PS1-based 133;P;k=i mark was introduced in 2bf1f80f7, and then it
become a full 133;A mark in aa47047a6, making the original printf line
redundant (because bash will also redraw PS1 on SIGWINCH).

The PS1-based 133;A was only missing the aid= option, and with that
added, it handles all of our cases (prompts, initial draw, and resizes).
2026-02-16 10:50:50 -08:00
Mitchell Hashimoto
0e68c6edb3 Update VOUCHED list (#10752)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10620) from
@mitchellh.
2026-02-16 10:49:21 -08:00
Mitchell Hashimoto
802516dc00 Update VOUCHED list (#10754)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10616) from
@mitchellh.
2026-02-16 10:49:10 -08:00
github-actions[bot]
76ec24fc66 Update VOUCHED list (#10755)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10616) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:48:37 +00:00
github-actions[bot]
515d28f05d Update VOUCHED list
https://github.com/ghostty-org/ghostty/discussions/10616#discussioncomment-DC_kwDOHFhdAs4A8YDu
2026-02-16 18:47:40 +00:00
Jon Parise
897b918f67 bash: remove redundant out-of-band OSC 133;A
The printf was part of the original script (9d6121245), and at the time,
this was the only place we'd emit the 133;A mark.

A PS1-based 133;P;k=i mark was introduced in 2bf1f80f7, and then it
become a full 133;A mark in aa47047a6, making the original printf line
redundant (because bash will also redraw PS1 on SIGWINCH).

The PS1-based 133;A was only missing the aid= option, and with that
added, it handles all of our cases (prompts, initial draw, and resizes).
2026-02-16 13:46:55 -05:00
github-actions[bot]
60298e9ca5 Update VOUCHED list (#10753)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10620) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:46:10 +00:00
github-actions[bot]
f46e335b15 Update VOUCHED list
https://github.com/ghostty-org/ghostty/discussions/10620#discussioncomment-DC_kwDOHFhdAs4A8YDa
2026-02-16 18:45:03 +00:00
github-actions[bot]
565abf5621 Update VOUCHED list (#10748)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10663) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 18:39:30 +00:00
Mitchell Hashimoto
fe7427ed2a input: paste encoding replaces unsafe control characters with spaces (#10746)
For a hardcoded set of control characters, replace them with spaces when
encoding pasted text. This is to prevent unsafe control characters from
being pasted which could trick a user into executing commands
unexpectedly.

This happens regardless of bracketed paste mode, because certain
characters processed by the kernel pty line discipline can break
bracketed paste (source from zsh:

https://zsh-workers.zsh.narkive.com/Kd3evJ7t/bracketed-paste-mode-in-xterm-and-urxvt).

This behavior is based on xterm's behavior
(caac5c35a2/button.c (L2578-L2595)),
including the list of characters. Note that as a comment in the code
says, we should be sourcing some of these from a tcgetattr call instead
of hardcoding them, but this is a good start.
2026-02-16 10:16:27 -08:00
Mitchell Hashimoto
37e902d90e input: paste encoding replaces unsafe control characters with spaces
For a hardcoded set of control characters, replace them with spaces when
encoding pasted text. This is to prevent unsafe control characters from being
pasted which could trick a user into executing commands unexpectedly.

This happens regardless of bracketed paste mode, because certain
characters processed by the kernel pty line discipline can break
bracketed paste (source from zsh: 
https://zsh-workers.zsh.narkive.com/Kd3evJ7t/bracketed-paste-mode-in-xterm-and-urxvt).

This behavior is based on xterm's behavior, including the list of
characters. Note that as a comment in the code says, we should be
sourcing some of these from a tcgetattr call instead of hardcoding them,
but this is a good start.
2026-02-16 10:03:50 -08:00
Kat
e94c90593e i18n: Update Turkish translations (#10634) 2026-02-16 15:16:06 +00:00
github-actions[bot]
87f756fb88 Update VOUCHED list (#10745)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10733) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 15:02:54 +00:00
github-actions[bot]
9af69ea3e5 Update VOUCHED list (#10744)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10735) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 15:01:10 +00:00
github-actions[bot]
ae58c0b292 Update VOUCHED list (#10743)
Triggered by [discussion
comment](https://github.com/ghostty-org/ghostty/discussions/10739) from
@mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 14:59:52 +00:00
github-actions[bot]
d15eb36545 Update VOUCHED list (#10742)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/7879#issuecomment-3908933639)
from @mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 14:57:38 +00:00
Leah Amelia Chen
e6341f1658 Move docs on developing Ghostty out of CONTRIBUTING.md, attempt two (#10740)
Follow-up to #8445, after a messed up rebase in #8339 brought it back
alongside an extra section.

All text removed from `CONTRIBUTING.md` was identical to the version
present in `HACKING.md` (according to a textual diff), excluding the
“Developer Guide” heading, the callout under it, and the “Nix VM
Integration Tests” section introduced in #8339.
2026-02-16 22:15:24 +08:00
Emir SARI
7363069873 Update po/tr_TR.UTF-8.po
Co-authored-by: Gokhun <3802058+ghokun@users.noreply.github.com>
2026-02-16 17:02:10 +03:00
Kat
98cc1c6d11 Move docs on developing Ghostty out of CONTRIBUTING.md, attempt two.
Follow-up to #8445, after a messed up rebase in #8339 brought it back
alongside an extra section.

All text removed from CONTRIBUTING.md was identical to the version
present in HACKING.md (according to a textual diff), excluding the
“Developer Guide” heading, the callout under it, and the “Nix VM
Integration Tests” section introduced in #8339.
2026-02-16 23:00:04 +11:00
Kat
7f611078dc i18n: Updated hr_HR translations (#10649)
Ref: ghostty-org#10632

First pass of the translation.
2026-02-16 11:45:35 +00:00
Filip M
a129ea3270 i18n: updated hr_HR translations for release 1.3.0
Ref: ghostty-org#10632
2026-02-16 12:33:19 +01:00
trag1c
34c6685e2e i18n: update Polish translations (#10665) 2026-02-16 09:58:09 +01:00
Bartosz Sokorski
d0ee2f0dbb i18n: update Polish translations
Co-authored-by: trag1c <dev@jakubr.me>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-02-16 09:45:31 +01:00
Jeffrey C. Ollie
32e319ec71 build(deps): bump cachix/install-nix-action from 31.9.0 to 31.9.1 (#10732)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 31.9.0 to 31.9.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31.9.1</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.33.0 -&gt; 2.33.3 by <a
href="https://github.com/github-actions"><code>@​github-actions</code></a>[bot]
in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/266">cachix/install-nix-action#266</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v31...v31.9.1">https://github.com/cachix/install-nix-action/compare/v31...v31.9.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2126ae7fc5"><code>2126ae7</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/266">#266</a>
from cachix/create-pull-request/patch</li>
<li><a
href="eb3d7b01e8"><code>eb3d7b0</code></a>
nix: 2.33.0 -&gt; 2.33.3</li>
<li>See full diff in <a
href="4e002c8ec8...2126ae7fc5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=31.9.0&new-version=31.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-02-15 21:05:14 -06:00
dependabot[bot]
0eaa0c53ba build(deps): bump cachix/install-nix-action from 31.9.0 to 31.9.1
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.9.0 to 31.9.1.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](4e002c8ec8...2126ae7fc5)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 00:20:32 +00:00
github-actions[bot]
1690046425 Update VOUCHED list (#10731)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10554#issuecomment-3905394671)
from @mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-15 23:16:31 +00:00
Mitchell Hashimoto
9bd74fd743 more clickable file path fixes (#10619)
This pull request addresses some of the remaining issues when matching
`~`, `$VAR`, `.directory/`, and embedded commas. It does not address
issues with embedded line breaks.

The PR is split in multiple commits carefully applying a set of changes
to

1. make the big regex more composable / readable
2. update some doc strings
3. add more test cases for the issues mentioned
4. two simple commits, each fixing the issues

Changes:

- **url: refactor regex into documented branches**
  Break up the big monolithic URL and path regex into named sub-pattern
  constants and compose the final expression from three commented
  branches:
  
  - URLs with a scheme
  - absolute or dot-relative paths
  - bare relative paths
  
  This commit only breaks up the regex. It keeps the existing matching
  behavior unchanged.
  

- **url: update top-level comment**
  

- **url: carefully extend test cases**
  Extend existing test cases with `~`, `$VAR`, and bare .-prefixed paths
  and embedded `,` comma handling.
  
  See following issue comments:
  
-
https://github.com/ghostty-org/ghostty/pull/10570#issuecomment-3853842036
-
https://github.com/ghostty-org/ghostty/issues/1972#issuecomment-3859329233
-
https://github.com/ghostty-org/ghostty/issues/1972#issuecomment-3857881196
  

- **url: remove `,` from path_chars**
  Related to #1972
  
  Fixes an issue when paths have embedded comma, e.g.:
  
      shared/src/foo/SomeItem.m:12, shared/src/
  
  with path_chars greedily consuming the rest of the string.
  
  Now file path matching stops at comma. Scheme URLs are unchanged and
  still using the comma.
  

- **url: fix matching `~`, `$VAR`, `.directory/`**
  Related to #1972
  
  This commit adds three new alternatives for
  `rooted_or_relative_path_prefix`:
  
  - `~/`
  - `$VAR` and
  - `.local/`, `.config/` etc. for dot-prefixed directory names
  
Remaining commits fix edge cases one by one:

  - **url: fix mid-string dot partial matches**
    `"foo.local/share"` (was partial match) → now matches fully
    
  - **url: fix $-numeric character matches**
    `"$10/$20"` → no match
    
  - **url: fix partial match of mid string $-variable**
    `"foo/$BAR/baz"` (was partial match) → matches fully now
    
  - **url: fix incomplete $-numeric behavior**
    `"$10/bar.txt"` (was partial match) → but should not match at all
2026-02-15 15:15:58 -08:00
github-actions[bot]
db055f13f5 Update VOUCHED list (#10730)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/10619#issuecomment-3905375367)
from @mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-15 23:12:15 +00:00
Mitchell Hashimoto
17bf042e6d macOS: show keyboard shortcuts in command palette (#10723)
Closes #10718

## Summary
- Populates the `symbols` field on `CommandOption` by looking up
keybindings via the existing `keyboardShortcut(for:)` API
- All the UI rendering (`ShortcutSymbolsView`) and the keybinding lookup
were already in place, this just wires them together

## AI Disclosure
Claude Code was used to assist with codebase exploration and drafting
the change. The implementation was manually verified by building and
testing locally on macOS with Xcode 26.2.

## Test plan
- [x] Built with `xcodebuild` on Xcode 26.1 and 26.2
- [x] Launched app, opened command palette, confirmed shortcuts appear
next to commands that have keybindings
- [x] Confirmed commands without keybindings show no shortcuts
<img width="912" height="744" alt="Screenshot 2026-02-14 at 12 55 42 PM"
src="https://github.com/user-attachments/assets/b988015c-21b6-4a17-9883-e23c87c6934b"
/>
2026-02-15 15:02:44 -08:00
github-actions[bot]
6784636c15 Update VOUCHED list (#10729)
Triggered by
[comment](https://github.com/ghostty-org/ghostty/issues/8524#issuecomment-3905321233)
from @mitchellh.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-15 22:46:43 +00:00
Mitchell Hashimoto
d76ab21ccc ci: update vouch to 1.3, create PRs instead of pushing to main (#10728)
This will let us re-enable our main branch protection rules. :)
2026-02-15 14:44:26 -08:00
Mitchell Hashimoto
ef9431b55c ci: update vouch to 1.3, create PRs instead of pushing to main
This will let us re-enable our main branch protection rules. :)
2026-02-15 14:43:02 -08:00
github-actions[bot]
4b3037ccc6 Update VOUCHED list
https://github.com/ghostty-org/ghostty/issues/10702#issuecomment-3904947115
2026-02-15 18:25:09 +00:00
Noah Bernsohn
951cf13d7e macOS: show keyboard shortcuts in command palette 2026-02-15 10:17:01 -06:00