Skip to content

bash: ghostty shell-integration doesn't work with readline mode indicator on OSX #10953

@mitchellh

Description

@mitchellh

Discussed in #10948

Originally posted by karlicoss February 22, 2026

Issue Description

I'm using inputrc configuration to set up vi mode across different cli apps that use readline:

$ cat .inputrc
set editing-mode vi
set show-mode-in-prompt on

My bash PS1 is default (I think)

koldun:~ karlicos$ echo $PS1
\h:\W \u\$

Expected Behavior

What I'm expecting is something like this -- i.e. mode indicator (ins/cmd) is on the same like as prompt:

(ins)koldun:~ karlicos$ echo hello
hello
(cmd)koldun:~ karlicos$ a b c

This is the behaviour I see in iterm/Terminal.app.

Actual Behavior

Ghostty prints vi mode indicator ((ins) or (cmd)) on the previous line instead of the same line as the shell prompt:

koldun:~ karlicos$ echo hello
hello
(ins)
(cmd)n:~ karlicos$ a b c

After this I tried to do the following in ghostty config and it fixed the issue

shell-integration = none

, but then things like sudo/ssh forwarding and terminal title won't work :(

I also tried only setting custom integration features as per this guide but seemed like it had no effect, e.g. terminal title was set as long as bash integration was enabled no matter the shell-integration-features. I'll try to dig that further, might be some separate issue.

I guess this is because readline adds something in front of PS1, and this is also what ghossty does here. Not 100% sure, possibly this is somehow related #1966

Reproduction Steps

  1. Configure .inputrc as per issue description
  2. Run ghostty without config/empty config
  3. Try pressing Enter multiple times, or typing something and hitting Esc to switch to command/normal vim mode, you should see the issue reproduce

Ghostty Logs

No response

Ghostty Version

Ghostty 1.3.0-main+861a9cf53

Version
  - version: 1.3.0-main+861a9cf53
  - channel: tip
Build Config
  - Zig version   : 0.15.2
  - build mode    : .ReleaseFast
  - app runtime   : .none
  - font engine   : .coretext
  - renderer      : renderer.generic.Renderer(renderer.Metal)
  - libxev        : kqueue

OS Version Information

OSX Darwin Kernel Version 24.6.0

(Linux only) Display Server

None

(Linux only) Desktop Environment/Window Manager

No response

Minimal Ghostty Configuration

# empty config is enough to reproduce

Additional Relevant Configuration

~/.inputrc

set editing-mode vi
set show-mode-in-prompt on

I acknowledge that:

  • I have reviewed the FAQ and confirm that my issue is NOT among them.
  • I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
  • I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (```) on separate lines.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions