From 52b643b6c687c20bba6389916ebdb897f3d11465 Mon Sep 17 00:00:00 2001 From: pagedown Date: Sat, 4 Feb 2023 15:55:22 +0800 Subject: [PATCH] Completion: Handle kitty +complete setup fish2 Provide the currently supported fish completion script when requesting version 2. --- kitty/entry_points.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty/entry_points.py b/kitty/entry_points.py index c44db04e1..753512d94 100644 --- a/kitty/entry_points.py +++ b/kitty/entry_points.py @@ -37,6 +37,8 @@ def complete(args: List[str]) -> None: raise SystemExit(1) if args[1] == 'fish2': args[1:1] = ['fish', '_legacy_completion=fish2'] + elif len(args) >= 3 and args [1:3] == ['setup', 'fish2']: + args[2] = 'fish' from kitty.constants import kitten_exe args = ['kitten', '__complete__'] + args[1:] os.execvp(kitten_exe(), args)