leetcode-cli: Add shell completions

+9
+9
pkgs/applications/misc/leetcode-cli/default.nix
··· 2 2 , fetchCrate 3 3 , rustPlatform 4 4 , pkg-config 5 + , installShellFiles 5 6 , openssl 6 7 , dbus 7 8 , sqlite ··· 24 25 25 26 nativeBuildInputs = [ 26 27 pkg-config 28 + installShellFiles 27 29 ]; 28 30 29 31 buildInputs = [ ··· 31 33 dbus 32 34 sqlite 33 35 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; 36 + 37 + postInstall = '' 38 + installShellCompletion --cmd leetcode \ 39 + --bash <($out/bin/leetcode completions bash) \ 40 + --fish <($out/bin/leetcode completions fish) \ 41 + --zsh <($out/bin/leetcode completions zsh) 42 + ''; 34 43 35 44 passthru.tests = testers.testVersion { 36 45 package = leetcode-cli;