Closed rockyzhang24 closed 2 years ago
I'm afraid I dont support homebrew, use the official kitty binaries. https://sw.kovidgoyal.net/kitty/binary/
Okay. I will try that. Thank you very much.
However, why the macOS dmg
in the releases crashes as well? Thanks.
Doesnt crash for me. If it is actually crashing, post the crash report.
Tried the binaries already and it crashed again. How can I get the crash report? Please apologize for my limited knowledge.
I re-downloaded the 0.23.1 from the releases and it works perfectly. Only 0.24.0 crashes.
When a program crashes on macOS, macOS will popup a dialog with a button to see the crash report. If you arent getting that then it isnt crashing.
Sorry for my inaccurate word. After clicking the icon or run kitty --config NONE
from another terminal, the kitty window appears but quits immediately. No other messages or dialog popups. Please see the demo below. Thanks.
That will be because the shell is exiting. Run kitty as
kitty --hold
to see the error message from the shell.
Okay. After running kitty --hold
in iTerm2, a kitty window is open, however, no error messages.
I am totally confused. Are you saying running:
kitty
causes kitty to exit immediately but adding --hold causes it to work normally?
I noticed in the screenshot of the kitty --hold
that the prompt is in red, does this mean that the shell rc is running with an error (non-zero exit code)?
Does this seem to be related to shell integration?
kitty --config=NONE -o shell_integration=disabled
@kovidgoyal Yes. In iTerm2, if I run kitty
without any arguments given or kitty --config NONE
, it exits immediately. If I run kitty --hold
, it works well, i.e., a kitty window is open.
I am confused as well because 0.23.1 version works perfectly, but 0.24.0 not.
Thanks.
Add shell_integration disabled to your kitty.conf and you will be fine.
It works after adding shell_integration disabled
in my kitty.conf. Does that mean the new feature, shell integration, cannot work on macOS?
No, it means you have something in your shell rc files that is breaking it.
I'm using zsh and how can I figure out what is breaking this cool feature quickly? Any ideas? Thank you so much.
You need to find what particular configuration in your shell rc that is causing the problem.
For example, comment out each line of the script and find the line that is causing the problem.
Or move ~/.zshrc
and add the previous script one paragraph at a time until something goes wrong. For zsh plugins, you can remove all and then add them one by one.
I'm not sure if set -x
will help when troubleshooting shell rc issues.
@page-down Okay. I will try to figure it out. I thought probably there would be some shortcuts I could go through to find it. :) Thanks.
@kovidgoyal Is it possible show some error messages when kitty exits due to the conflicts between shell integration and some zsh configurations?
There are no error messages from kitty. Your shell is failing, and its not printing any error messages, if it did, they would show up when using --hold. Why its doing that, I have no idea. In general I suggest you prune your zshrc to what you actually need/use/understand.
I figured it out.
The zimfw/input plugin makes kitty exit. I uninstalled it and kitty works well now. I have little knowledge about zsh so I have no idea which line in https://github.com/zimfw/input/blob/master/init.zsh causes this issue. I will open an issue at that repo to see whether its author @ericbn has ideas.
Thank you guys for your patience and helping me solve this issue.
@kovidgoyal I find that line 113, https://github.com/zimfw/input/blob/master/init.zsh#L113, causes this issue. I have no ideas what is the meaning of this line. Do you think whether it can be fixed on kitty's side? Thanks a lot.
I highly doubt its that line causing the issue, indeed sourcing the entire init.zsh file causes no issues in kitty 0.24 for me with shell integration enabled.
I commented that line and then I can opened kitty and kitty worked normally.
Yeah that's likely because that line is interactiong with something else in your zsh config. Use an empty zsh config with only init.zsh sourced and see if it still breaks.
After further investigation, I found that if I kept zimfw/input installed but uninstalled these two plugins zsh-syntax-highlighting and zsh-history-substring-search. Kitty still works normally. Based on your test (sourced zimfw/input/init.zsh directly and kitty was still alive), I think the issue is caused by these two plugins, not zimfw/input.
However, if I just uninstalled either one, the issue existed. I had to uninstall both to make kitty work normally. These two plugins are zsh community driven and they are very popular. They are very complicated so I don't know how to dig into deeply to find the concrete lines causing this issue. Any ideas?
Thank you so much.
I have no idea. Using zsh-syntax-highlighting and zimfw/input works fine for me with kitty's zsh integration.
That's weird. Do you install the whole zimfw or just source zimfw/input/init.zsh? I am using zimfw framework. I uninstalled all the other plugins but just kept zsh-syntax-highlighting and zimfw/input (both were installed via zmodule
in .zimrc
file), issue still existed.
Thank you very much anyway.
Just to mention that this issue was solved after upgrading to 0.24.1. Thanks @kovidgoyal
Describe the bug Installed kitty via homebrew. Click the icon to open it but it crashes immediately. Tried to restart my laptop, the issue was still there. Also tried to download the macOS.dmg directly, and same issue happened.
BTW, the previous version 0.23.1 worked well.
To Reproduce On macOS, run
brew install kitty
. Then click kitty icon.Environment details
Additional context In iTerm2, run
kitty --config NONE
, same issue.Thanks.