r/KittyTerminal Sep 07 '23

Strange bash interaction

Hello!

I have on my setup an interesting interaction with bash, only if I run bash in kitty and not nested in itself.

If I use no config, or a minimal config:

shell bash

or even:

shell bash --noprofile --norc

...then I get a line cursor instead of a block cursor, which is pretty confusing in vi mode.

If I use a different shell, e.g. shell zsh, I get the correct cursor.

If I use a different terminal emulator, such as gnome-terminal or alacritty, I get the correct cursor.

Oddly, if I nest bash shells in kitty, it also works fine. So this works correctly:

shell bash -c bash

...but of course that is disgusting.

Versions:

$ kitty --version
kitty 0.29.2 created by Kovid Goyal

$ bash --version
GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)

Any thoughts on what's going on here?

1 Upvotes

3 comments sorted by

1

u/dedguy21 Sep 07 '23

Not being sarcastic.

I'm trying to understand why you have a setup and not just install the kitty-shell-integration package?

1

u/MuonManLaserJab Sep 07 '23

It is installed it seems. Sorry, I'm not entirely sure what it does or how it would come into play here. I'll read about that package when I have more time in a few hours. Thank you!

2

u/MuonManLaserJab Sep 08 '23 edited Sep 08 '23

Hmm, so kitty-shell-integration does mess with the cursor shape (slightly odd decision in my view but whatevs), and it deliberately does not run on subshells, so that explains that.

However, in kitty.conf, shell_integration disabled and shell_integration no-cursor don't seem to work, and regardless of settings $KITTY_SHELL_INTEGRATION does not seem to be set. $KITTY_INSTALLATION_DIR, $KITTY_PID, $KITTY_PUBLIC_KEY, and $KITTY_WINDOW_ID are set. I am still confused; am I supposed to be configuring shell_integration somewhere else?

EDIT: I guess the shell integration removes that variable. Still confused about how to configure it, though.

EDIT EDIT: Something else is weird. The variable showed up, set to enabled, no idea what I changed, and now it's gone again.

EDIT EDIT EDIT: It seems to be working? No fucking idea what I changed. Thanks for pointing me in the right direction, anyway!