about summary refs log tree commit diff
path: root/pkgs/tools/misc/engage/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/engage/default.nix')
-rw-r--r--pkgs/tools/misc/engage/default.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/tools/misc/engage/default.nix b/pkgs/tools/misc/engage/default.nix
index c01dcc2e68796..f9b0f411ee8a3 100644
--- a/pkgs/tools/misc/engage/default.nix
+++ b/pkgs/tools/misc/engage/default.nix
@@ -1,4 +1,5 @@
 { lib
+, installShellFiles
 , rustPlatform
 , fetchgit
 }:
@@ -19,6 +20,22 @@ rustPlatform.buildRustPackage {
 
   cargoHash = "sha256-+4uqC0VoBSmkS9hYC1lzWeJmK873slZT04TljHPE+Eo=";
 
+  nativeBuildInputs = [
+    installShellFiles
+  ];
+
+  postInstall = "installShellCompletion --cmd ${pname} "
+    + builtins.concatStringsSep
+      " "
+      (builtins.map
+        (shell: "--${shell} <($out/bin/${pname} self completions ${shell})")
+        [
+          "bash"
+          "fish"
+          "zsh"
+        ]
+      );
+
   meta = {
     description = "A task runner with DAG-based parallelism";
     homepage = "https://or.computer.surgery/charles/engage";