about summary refs log tree commit diff
path: root/pkgs/tools/misc/fd
diff options
context:
space:
mode:
authordywedir <dywedir@protonmail.ch>2017-11-16 11:58:32 +0200
committerdywedir <dywedir@protonmail.ch>2017-11-16 11:58:32 +0200
commit23705ce319705a17ca38e56b33da9c833d8c4f35 (patch)
tree4dfa56392f59dac9b8bd8832ff5e52af83674635 /pkgs/tools/misc/fd
parent67b4e7a4c0e3bfb8dda036abd99e16d64a6e4b07 (diff)
fd: install shell completions
Diffstat (limited to 'pkgs/tools/misc/fd')
-rw-r--r--pkgs/tools/misc/fd/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix
index 09debd461dc49..5ac5233c91655 100644
--- a/pkgs/tools/misc/fd/default.nix
+++ b/pkgs/tools/misc/fd/default.nix
@@ -16,6 +16,11 @@ rustPlatform.buildRustPackage rec {
   preFixup = ''
     mkdir -p "$out/man/man1"
     cp "$src/doc/fd.1" "$out/man/man1"
+
+    mkdir -p "$out/share/"{bash-completion/completions,fish/completions,zsh/site-functions}
+    cp target/release/build/fd-find-*/out/fd.bash-completion "$out/share/bash-completion/completions/"
+    cp target/release/build/fd-find-*/out/fd.fish "$out/share/fish/completions/"
+    cp target/release/build/fd-find-*/out/_fd "$out/share/zsh/site-functions/"
   '';
 
   meta = with stdenv.lib; {