diff options
| author | thenbe <33713262+thenbe@users.noreply.github.com> | 2023-09-26 23:08:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-26 22:08:20 +0200 |
| commit | ca37d3417ea7bb95c48100e9ed038900bd4cdf37 (patch) | |
| tree | ccb138a31f6f24733913737c146b099db98403a1 | |
| parent | cargo-bump: init at 1.1.1 (#257410) (diff) | |
| download | nixpkgs-ca37d3417ea7bb95c48100e9ed038900bd4cdf37.tar.gz | |
glow: install shell completions (#257282)
* glow: install shell completions
---------
Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
| -rw-r--r-- | pkgs/applications/editors/glow/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/applications/editors/glow/default.nix b/pkgs/applications/editors/glow/default.nix index cbd63c0ffcd0..fde2bebe5e4e 100644 --- a/pkgs/applications/editors/glow/default.nix +++ b/pkgs/applications/editors/glow/default.nix @@ -1,6 +1,8 @@ { lib , buildGoModule , fetchFromGitHub +, installShellFiles +, stdenv }: buildGoModule rec { pname = "glow"; @@ -19,6 +21,14 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd glow \ + --bash <($out/bin/glow completion bash) \ + --fish <($out/bin/glow completion fish) \ + --zsh <($out/bin/glow completion zsh) + ''; + meta = with lib; { description = "Render markdown on the CLI, with pizzazz!"; homepage = "https://github.com/charmbracelet/glow"; |
