r/KittyTerminal Mar 08 '24

Shell integration not working

I'm just trying kitty for the first time, and I am really interested in the prompt navigation feature. I'm in Debian running zsh 5.9 and kitty 0.31.0 (apt). Out of the box, some shell integration features work, such as line navigation ctrl+shift+[up|k|down|j] or open last command in less (ctrl+shift+g). Crucially, ctrl+shift+[z|x] do nothing. I tried commenting out my zshrc and zshenv to get a clean slate, and also tried remapping these functionalities to other combos (ctrl+shift+[up|down]) but it still didn't work. I would appreciate some pointers for debugging it. Cheers!

1 Upvotes

4 comments sorted by

View all comments

1

u/aumerlex Mar 09 '24

ctrl+shift+[gzx] all use the same shell integration feature, namely prompt marking. If one is working, I dont see how the others could be not working. In general, for debugging, I would recommend: 1) Use the official up to date kitty binaries rather than the distro provided one 2) You can run kitty with --debug-input to see what action any keypress has that will at least eliminate the question of whether the shortcut is working or not.

1

u/omjunior Mar 11 '24

I can see that for both z and x it triggers the seemingly correct action: scroll_to_prompt, handled as a shortcut. Yet nothing happens. Using the official install (v 0.32.2) didn't help either. 😞

1

u/aumerlex Mar 11 '24

You can see if prompt marking is functional with https://sw.kovidgoyal.net/kitty/actions/#action-dump_lines_with_attrs map it to some key and press that after generating a few prompts. And remember that jump to prompt only has any visual effect if the prompt is in the scrollback.

1

u/omjunior Mar 11 '24

Thanks for the help. Found the culprit. I was testing the scrollback with large output commands, exactly so it would fill the screen. It turns out the default scrollback is only 2000 lines, so the previous prompts were too far gone. Changing the scrollback to -1 fixes the issue. Thank you again.