Merge pull request #327768 from KenMacD/aichat-shell-completions

aichat: add shell completion
This commit is contained in:
Peder Bergebakken Sundt
2024-07-25 23:23:11 +02:00
committed by GitHub
+6
View File
@@ -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";