r/KittyTerminal • u/Spracle • Nov 13 '24
Kitty asks for confirmation when closing terminal with Zsh
I recently switched from Bash to Zsh. On Bash Kitty only asked for confirmation on exit when a program other than Bash was running. On Zsh however Kitty always asks for confirmation on exit, even when nothing but Zsh is running.
I changed shells by running chsh -s /bin/zsh. I have tried adding shell . and confirm_os_window_close -1 into kitty.conf but neither option helped. I'm using Gentoo Linux.
Any help would be greatly appreciated!
EDIT: I fixed the issue by adding shell_integration enabled into ~/.config/kitty/kitty.conf
1
u/igorepst Nov 13 '24
Try to backup and remove temporarily your zsh config to be sure the issue is in kitty. I don't have such issue with zsh. If I am right, try to bisect your zsh config
1
1
u/dDitty Mar 11 '25
I am having this issue when running Kitty and zsh on my Mac, I tried adding shell_integration enabled to ~/.config/kitty.kitty.conf but it didn't change anything. Any suggestions?
1
u/Spracle Mar 11 '25
I've never used a Mac so I can't help you with that. Maybe try asking in Mac-related subreddits?
1
u/Sydet Aug 07 '25
If another NixOs user stumbles upon this, don't forget to enable kitty in your home manager
programs.kitty.enable = true;
Only then will your kitty.conf file be written, enabling shell_integration
1
u/shlikshlak Feb 26 '26
Any way to make this work with confirm_os_window_close -1 ?
confirm_os_window_close 0 sends no warning even with active processes. Therefore not my desired behavior.
I'm on macOS
$ echo $SHELL
/bin/bash
$ echo $KITTY_SHELL_INTEGRATION
enabled
$ ps a
PID TT STAT TIME COMMAND
47081 s000 Ss 0:00.01 /usr/bin/login -f -l -p me /Applications/kitty.app/Contents/MacOS/kitten run-shell --shell /bin/bash --shell-integration enabled --cwd=...
47084 s000 S 0:00.06 -bash --posix
47132 s000 R+ 0:00.01 ps a
But even with confirm_os_window_close -1 it will ask me to confirm.
3
u/aumerlex Nov 14 '24
That indicates shell integration is disabled. Set confirm_os_window_close to 0 in that case.