Kitty: Tab completion bugged with zsh frameworks zim and Prezto

Created on 19 Feb 2019  路  10Comments  路  Source: kovidgoyal/kitty

When you start writing a command and press tab, the thing you started writing stays in the screen and gets duplicated but it doesn't do anything. For example, if I start writing gi and press TAB, it will look like gigi on my screen and if I want to get it to say git, it will instead say gigit. Pressing enter still makes it behave as if I have typed git even though it says gigit. See GIF (Zim is used) for clarification.

out

Most helpful comment

Found a solution. Add following to .zshrc

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

https://github.com/sindresorhus/pure/issues/412
https://github.com/sindresorhus/pure/issues/300#issuecomment-328744993

All 10 comments

I have no idea what frame zim and prezto are, I need a minimal .zshrc to reproduce your issue with, or otherwise use --dump-bytes with kitty to create a minimal dump file to recreate the issue.

My apologies, the title was incorrect. It was supposed to be "framework". They are configuration frameworks for zsh. https://github.com/zimfw/zimfw and https://github.com/sorin-ionescu/prezto

Can be recreated with this .zshrc

# zim
export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh

autoload -Uz compinit
compinit
# Completion for kitty
kitty + complete setup zsh | source /dev/stdin

If I remove the zim part and use pure ZSH then it works correctly.

doesn't that require something in ~/.zim?

Yes, you need to install zim. https://github.com/zimfw/zimfw

I identified the module in ZSH that messes it up, it's https://github.com/zimfw/zimfw/blob/master/modules/prompt/README.md. If I turn that module off, it works. Seems to be the same bug in Hyper.js but works on iTerm2

Found a solution. Add following to .zshrc

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

https://github.com/sindresorhus/pure/issues/412
https://github.com/sindresorhus/pure/issues/300#issuecomment-328744993

I have this identical problem but only when I ssh into a remote server. Happens with ohmyzsh and pure prompt. Adding those two lines to my .zshrc does not fix anything.

Do this: https://sw.kovidgoyal.net/kitty/faq.html#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer

It works! I had to alter my path so that anaconda wasn't being used first.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crocket picture crocket  路  4Comments

hujianxin picture hujianxin  路  3Comments

Ulrar picture Ulrar  路  3Comments

reed-jones picture reed-jones  路  4Comments

bewzaalex picture bewzaalex  路  3Comments