diff --git a/kitty/constants.py b/kitty/constants.py index eea21043e..157bd88a7 100644 --- a/kitty/constants.py +++ b/kitty/constants.py @@ -127,6 +127,7 @@ def wakeup() -> None: terminfo_dir = os.path.join(kitty_base_dir, 'terminfo') logo_png_file = os.path.join(kitty_base_dir, 'logo', 'kitty.png') beam_cursor_data_file = os.path.join(kitty_base_dir, 'logo', 'beam-cursor.png') +shell_integration_dir = os.path.join(kitty_base_dir, 'shell-integration') try: shell_path = pwd.getpwuid(os.geteuid()).pw_shell or '/bin/sh' except KeyError: diff --git a/kitty_tests/check_build.py b/kitty_tests/check_build.py index 951dcdaaa..798ef5631 100644 --- a/kitty_tests/check_build.py +++ b/kitty_tests/check_build.py @@ -49,9 +49,11 @@ class TestBuild(BaseTest): self.assertGreater(len(names), 8) def test_filesystem_locations(self) -> None: - from kitty.constants import logo_png_file, terminfo_dir + from kitty.constants import terminfo_dir, logo_png_file, shell_integration_dir + zsh = os.path.join(shell_integration_dir, 'kitty.zsh') self.assertTrue(os.path.isdir(terminfo_dir), f'Terminfo dir: {terminfo_dir}') self.assertTrue(os.path.exists(logo_png_file), f'Logo file: {logo_png_file}') + self.assertTrue(os.path.exists(zsh), f'Shell integration: {zsh}') def test_ca_certificates(self): import ssl diff --git a/setup.py b/setup.py index a9138efe8..b326d947c 100755 --- a/setup.py +++ b/setup.py @@ -1099,6 +1099,7 @@ def package(args: Options, bundle_type: str) -> None: shutil.copy2('logo/kitty.png', os.path.join(libdir, 'logo')) shutil.copy2('logo/beam-cursor.png', os.path.join(libdir, 'logo')) shutil.copy2('logo/beam-cursor@2x.png', os.path.join(libdir, 'logo')) + shutil.copytree('shell-integration', os.path.join(libdir, 'shell-integration'), dirs_exist_ok=True) allowed_extensions = frozenset('py glsl so'.split()) def src_ignore(parent: str, entries: Iterable[str]) -> List[str]: