termbook: install shell completions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, pkg-config
|
||||
, oniguruma
|
||||
, stdenv
|
||||
@@ -23,6 +24,7 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
pkg-config
|
||||
];
|
||||
|
||||
@@ -41,6 +43,13 @@ rustPlatform.buildRustPackage rec {
|
||||
ln -sf ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd termbook \
|
||||
--bash <($out/bin/termbook completions bash) \
|
||||
--fish <($out/bin/termbook completions fish) \
|
||||
--zsh <($out/bin/termbook completions zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A runner for `mdbooks` to keep your documentation tested";
|
||||
homepage = "https://github.com/Byron/termbook/";
|
||||
|
||||
Reference in New Issue
Block a user