jiten: install completion files

This commit is contained in:
teto 2025-05-20 05:14:38 +02:00 committed by Matthieu Coudron
parent 1405e84336
commit 875a0a5a97

View file

@ -5,6 +5,7 @@
bash, bash,
makeWrapper, makeWrapper,
kanjidraw, kanjidraw,
installShellFiles,
pcre, pcre,
sqlite, sqlite,
nodejs, nodejs,
@ -34,7 +35,10 @@ python3.pkgs.buildPythonApplication rec {
./cookie-fix.patch ./cookie-fix.patch
]; ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [
makeWrapper
installShellFiles
];
buildInputs = [ buildInputs = [
pcre pcre
sqlite sqlite
@ -66,6 +70,11 @@ python3.pkgs.buildPythonApplication rec {
postInstall = '' postInstall = ''
# requires pywebview # requires pywebview
rm $out/bin/jiten-gui rm $out/bin/jiten-gui
installShellCompletion --cmd jiten \
--bash <(_JITEN_COMPLETE=bash_source $out/bin/jiten) \
--zsh <(_JITEN_COMPLETE=zsh_source $out/bin/jiten) \
--fish <(env _JITEN_COMPLETE=fish_source $out/bin/jiten)
''; '';
meta = with lib; { meta = with lib; {