From eee8106f9e11fd3fb5733fdf0dc1eae2a166c26b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Jun 2022 07:36:09 +0530 Subject: [PATCH] Fix a regression that broke completion when using a kitty alias instead of having kitty on PATH --- kitty/complete.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitty/complete.py b/kitty/complete.py index 10a114540..d203178ac 100644 --- a/kitty/complete.py +++ b/kitty/complete.py @@ -676,10 +676,11 @@ def find_completions(words: Sequence[str], new_word: bool, entry_points: Iterabl ans = Completions() if not words: return ans - if words[0] in ('edit-in-kitty', 'clone-in-kitty'): + exe = os.path.basename(words[0]) + if exe in ('edit-in-kitty', 'clone-in-kitty'): complete_launch_wrapper(ans, words[1:], new_word, allow_files=words[0] != 'clone-in-kitty') return ans - if words[0] != 'kitty': + if exe != 'kitty': return ans words = words[1:] if not words or (len(words) == 1 and not new_word):