leetcode-cli: Add shell completions

+9
+9
pkgs/applications/misc/leetcode-cli/default.nix
··· 2 , fetchCrate 3 , rustPlatform 4 , pkg-config 5 , openssl 6 , dbus 7 , sqlite ··· 24 25 nativeBuildInputs = [ 26 pkg-config 27 ]; 28 29 buildInputs = [ ··· 31 dbus 32 sqlite 33 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; 34 35 passthru.tests = testers.testVersion { 36 package = leetcode-cli;
··· 2 , fetchCrate 3 , rustPlatform 4 , pkg-config 5 + , installShellFiles 6 , openssl 7 , dbus 8 , sqlite ··· 25 26 nativeBuildInputs = [ 27 pkg-config 28 + installShellFiles 29 ]; 30 31 buildInputs = [ ··· 33 dbus 34 sqlite 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 + ''; 43 44 passthru.tests = testers.testVersion { 45 package = leetcode-cli;