Fix a regression that broke completion when using a kitty alias instead of having kitty on PATH
This commit is contained in:
parent
80ad596d3d
commit
eee8106f9e
@ -676,10 +676,11 @@ def find_completions(words: Sequence[str], new_word: bool, entry_points: Iterabl
|
|||||||
ans = Completions()
|
ans = Completions()
|
||||||
if not words:
|
if not words:
|
||||||
return ans
|
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')
|
complete_launch_wrapper(ans, words[1:], new_word, allow_files=words[0] != 'clone-in-kitty')
|
||||||
return ans
|
return ans
|
||||||
if words[0] != 'kitty':
|
if exe != 'kitty':
|
||||||
return ans
|
return ans
|
||||||
words = words[1:]
|
words = words[1:]
|
||||||
if not words or (len(words) == 1 and not new_word):
|
if not words or (len(words) == 1 and not new_word):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user