ferium: add shell completions

This commit is contained in:
Sofi 2022-07-21 01:01:17 +02:00
parent c5eb9af9c9
commit 2e86faf11a
No known key found for this signature in database
GPG Key ID: 0A503D1D1B2722AF

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "ferium";
@ -21,6 +21,15 @@ rustPlatform.buildRustPackage rec {
# Requires an internet connection
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/ferium complete $shell > ferium.$shell
installShellCompletion ferium.$shell
done
'';
meta = with lib; {
description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases";
homepage = "https://github.com/gorilla-devs/ferium";