kitten stub: suppress download during tab completion when binary absent - #10219
Closed
kovidgoyal with Copilot wants to merge 1 commit into
Closed
kitten stub: suppress download during tab completion when binary absent#10219kovidgoyal with Copilot wants to merge 1 commit into
kovidgoyal with Copilot wants to merge 1 commit into
Conversation
…nary not installed When the kitten stub script (shell-integration/ssh/kitten) is invoked in a shell completion context but the actual kitten binary has not yet been downloaded, it previously tried to download kitten and showed a yellow warning message. This was disruptive during tab completion. Fix by: - Having completion hooks (bash, zsh, fish) set KITTY_SHELL_INTEGRATION_COMPLETION=1 in the environment when calling kitten for completions - Having the stub script check for this env var and exit silently (exit 0) when the kitten binary is not yet available Fixes: #10218
Copilot
AI
changed the title
Fix kitten stub script to silently exit during tab completion when binary not installed
kitten stub: suppress download during tab completion when binary absent
Jul 3, 2026
Copilot created this pull request from a session on behalf of
kovidgoyal
July 3, 2026 17:53
View session
Owner
|
@copilot: Actually rather than using an env var check if the first argument in complete and exit in that case, no need for an env var. Drop your previous commit and create a new one implementing this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
kitten sshinstalls the stub script on a remote and the actual kitten binary hasn't been downloaded yet, tab-completing any kitten-backed command triggers a download with a yellow warning — disruptive and unexpected in a completion context.Changes
Completion hooks set
KITTY_SHELL_INTEGRATION_COMPLETION=1before invokingkitten __complete__ <shell>:shell-integration/bash/kitty.bash— inline prefix oncommand kittenshell-integration/zsh/completions/_kitty— inline prefix oncommand kittenshell-integration/fish/vendor_completions.d/kitty.fish— inline prefix oncommand kittenshell-integration/fish/vendor_completions.d/kitten.fish— sameStub script exits silently when invoked in completion context without a binary (
shell-integration/ssh/kitten): after the existing binary checks (whichexecif found), bail out cleanly:This sits after the two
exec_kittypaths, so a present binary is still used normally.