@@ -53,10 +53,10 @@ buildPythonApplication rec {
5353
5454 nativeBuildInputs = [
5555 pkgconfig sphinx ncurses
56+ installShellFiles
5657 ] ++ stdenv.lib.optionals stdenv.isDarwin [
5758 imagemagick
5859 libicns # For the png2icns tool.
59− installShellFiles
6060 ];
6161
6262 propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL;
@@ -113,10 +113,10 @@ buildPythonApplication rec {
113113 wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ncurses.dev ]}"
114114 runHook postInstall
115115
116− mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
117− "$out/bin/kitty" + complete setup fish > "$out/share/fish/vendor_completions.d/kitty.fish"
118− "$out/bin/kitty" + complete setup bash > "$out/share/bash-completion/completions/kitty.bash"
119− "$out/bin/kitty" + complete setup zsh > "$out/share/zsh/site-functions/_kitty"
116+ installShellCompletion --cmd kitty \
117+ --bash <("$out/bin/kitty" + complete setup bash) \
118+ --fish <("$out/bin/kitty" + complete setup fish) \
119+ --zsh <("$out/bin/kitty" + complete setup zsh)
120120 '';
121121
122122 postInstall = ''