diff --git a/pkgs/bob-nvim.nix b/pkgs/bob-nvim.nix index 0c52279a..0a542eb9 100644 --- a/pkgs/bob-nvim.nix +++ b/pkgs/bob-nvim.nix @@ -1,9 +1,11 @@ -{ rustPlatform, fetchFromGitHub }: +{ installShellFiles, rustPlatform, fetchFromGitHub }: rustPlatform.buildRustPackage rec { pname = "bob"; version = "3.0.1"; + + buildInputs = [ installShellFiles ]; src = fetchFromGitHub { owner = "MordechaiHadad"; repo = "bob"; @@ -11,4 +13,12 @@ rustPlatform.buildRustPackage rec { hash = "sha256-Op/NXWssylgAOb1BccSOz7JqXFranzAsGICFMF3o/K8="; }; cargoLock.lockFile = "${src}/Cargo.lock"; + + postInstall = # bash + '' + installShellCompletion --cmd bob \ + --bash <($out/bin/bob complete bash) \ + --zsh <($out/bin/bob complete zsh) \ + --fish <($out/bin/bob complete fish) + ''; }