From 882c4a9d0a9479a81b9835d6f762db051729bd42 Mon Sep 17 00:00:00 2001 From: Kenny MacDermid Date: Tue, 16 Jul 2024 21:20:01 -0300 Subject: [PATCH] aichat: add shell completion --- pkgs/tools/misc/aichat/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/misc/aichat/default.nix b/pkgs/tools/misc/aichat/default.nix index 6bd57a6e8e96..5052c38b5f2d 100644 --- a/pkgs/tools/misc/aichat/default.nix +++ b/pkgs/tools/misc/aichat/default.nix @@ -4,6 +4,7 @@ , rustPlatform , fetchFromGitHub , pkg-config +, installShellFiles }: rustPlatform.buildRustPackage rec { @@ -21,6 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config + installShellFiles ]; buildInputs = lib.optionals stdenv.isDarwin [ @@ -29,6 +31,10 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.Security ]; + postInstall = '' + installShellCompletion ./scripts/completions/aichat.{bash,fish,zsh} + ''; + meta = with lib; { description = "Use GPT-4(V), Gemini, LocalAI, Ollama and other LLMs in the terminal"; homepage = "https://github.com/sigoden/aichat";