filebrowser: add shell completions

This commit is contained in:
nix-julia
2026-07-08 09:26:34 +03:30
parent 3248c3a666
commit 5f168212c4
+11
View File
@@ -1,4 +1,5 @@
{
stdenv,
lib,
fetchFromGitHub,
buildGoModule,
@@ -8,6 +9,7 @@
pnpmBuildHook,
nodejs-slim,
pnpm_10,
installShellFiles,
nix-update-script,
nixosTests,
}:
@@ -64,6 +66,15 @@ buildGoModule {
vendorHash = "sha256-WXbXD75acK4woS7UC0G73pY48aGmp1l0spDc3sGYXMg=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd filebrowser \
--bash <($out/bin/filebrowser completion bash) \
--fish <($out/bin/filebrowser completion fish) \
--zsh <($out/bin/filebrowser completion zsh )
'';
excludedPackages = [ "tools" ];
preBuild = ''