glab: install shell completions (#168166)

* glab: install shell completions

* Update pkgs/applications/version-management/git-and-tools/glab/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
main
Daniel Nagy 2 years ago committed by GitHub
parent 8023ab5825
commit ac83e58d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      pkgs/applications/version-management/git-and-tools/glab/default.nix

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, stdenv }:
buildGoModule rec {
pname = "glab";
@ -24,6 +24,15 @@ buildGoModule rec {
subPackages = [ "cmd/glab" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
installShellCompletion --cmd glab \
--bash <($out/bin/glab completion -s bash) \
--fish <($out/bin/glab completion -s fish) \
--zsh <($out/bin/glab completion -s zsh)
'';
meta = with lib; {
description = "An open-source GitLab command line tool";
license = licenses.mit;

Loading…
Cancel
Save